Noob: possible to have the barcode scanner be “persistent”, as in always on and open when the app is opened?


I’m trying to replicate a QR scanning based time clock. In the documentation, the example of the scanner is linked to a button call. Is it possible to just have it load automatically within the page? Here’s an example:

I want to send the code into Airtable with timestamp data, and then be ready for the next scan.

You could try something like this:

Infinite Scan on off

Two Examples:
First one, scanner will initiate as soon as screen opens.
Second, scanner will start when button is pressed.
Third, scanner is able to be toggled on and off via a switch. Not proper coding use for a switch, but hey, a switch looks cool. :slight_smile:

Code is messy and Solutions may be glitchy but I just threw it together before heading out. But it will give you an idea.

Good Luck and Happy Thunking.

This should simulate a persistent scanner.


Thanks! I’m on the run as well, so will test this. The scanner is always full screen? Or is it possible to load it inside an element?

Due to the scanner being an invisible component and not actually physically being on the screen, we have no control of its size. So yes, scanner is always fullscreen.

Let me know how you go with it.

Link to the project I created for this.

Should save you some time :). Just copy and modify to your needs.

1 Like


Wish I could load it just half the screen :frowning: Would be a quick and perfect solution otherwise. Doesn’t appear that Thunkable allows custom plugins or remixing existing elements.

Half the screen? And no Thunkable X does not allow plugins. Open the link and in top right corner click “Make Copy”, should allow you to remix it.

This has been interesting playing around with, I have it working and saving data to airtable as well.

The screenshot I posted at the top, is from a landscape iPhone. Half the screen for scanning and then the other half for static info and momentary changes to show “Clocked in” or “Clocked out”.

Half and half would get my constant scanning, and the ability to display some information.

Hum. I suppose I could have it open the scanner on load, then close the scanner to display info in Screen briefly, and then after_delay_ loop back to loading the scanner.

Airtable! My favorite thing :D. I just need to figure out recording checking, and if the user is already “clocked in”, then change to “clocked out”, and vice versa.

Can you load Airtable data locally so it doesn’t always have to make an outside call?

Would be example 1. “When screen 1 opens” This will do exactly that.

As for Airtable being stored locally, not possible that I am aware of but if want to store data locally use the LocalDB component.(Why are you looking to have airtable stored locally?)

If you need any further help, feel free to ask.

1 Like

This would be used in developing nations where electricity/internet outages are common. So if I stored some data locally, and then pushed it to Airtable in intervals, that might help to alleviate that issue. Some of the apps I’ve looked at that provide this functionally just don’t work when the internet is down.

So if I stored basic user info (string from QR, name, and in / out state), and then a log of in’s and out’s, it should continue to function?

Not sure if that functionality is possible either, but I’m assuming it’s workable. Not asking you to do that for me :D. Just explaining more and thinking out loud.

Well yes I do reccomend using the LocalDB component. I will continue experimenting with this as it is interesting to explore. Will keep you updated if you wish. LocalDB is not my strong point, any time is a good time to learn :).

1 Like

You are a rockstar. Any and all help is appreciated!

I suppose I could navigate to another screen briefly to display info, and return back after time

Are you going to prefill the database with pre-assigned QR Codes and Names? As you can create a database in Airtable then copy and paste it into the LocalDB component.

Obviously they are to track employees?

Yes. We have a People table with strings for the QR codes already. So I’d just load in a few fields for all People records (with a view to filter only the one’s needed).
Yes, it’s for staff, but also for clients. Basically trying to create an in/out log. It’s for a residential rehabilitation facility. I’d make an API call and grab a snapshot from our security camera as well.

If you know airtable well you can use the API to filter searches, I havent experimented with that yet so know little to nothing about it. As for the in out log, do you just want to create a running log recording the login and logout times, or show if a person is actively logged in or not?

Running log of in’s and out’s. On scan, it would display change state and present information.
Something like this:

Shouldn’t be too difficult. :slight_smile:. Are you on a deadline?

No major deadline. If I could show proof of concept then I’d have a bit more time. :smiley:

We had an app we were going to use, but it’s penny pinching season so I’m hunting for alternatives.

Internet may be an issue. The LocalDB component doesnt seem to possess the capability to update when new entries are made, so you cant view anything and also there is no way that i know of to export the LocalDB to an external database.

1 Like

Odd that the LocalDB seems to be pretty weak. It’s not a deal breaker, and using only Airtable simplifies things a bit I’m sure.

I have found a way to view the data in the LocalDB, using data viewer list component.Here is what it looks like:

not pretty atm but functional(mostly lol)
Yes if you are just tracking scan times yes airtable would be simpler but if you want to track who scans in and out, that knowledge of airtable is a little grey for me at the moment.

1 Like