Qr code scanning

Hi, I have an app with more than one duplicate page. The pages does the same thing just for different purposes.
What I have realized is that, the first page I desgined and coded works correctly with qr scanner but all the other pages tells my users their phones does not have qr scanner.

All the coding are exctally the same,

Why will the app give me this problem?

Thanks in advance

You should use just one page, and adjust the settings of that page for what you need to scan/record.

Correct me if I am understanding wrong please. You saying for each page I should have a different qr/ barcode scanner name?

No, I am saying you should just use one page, and adjust your other parameters (as for the other pages)

Please show your relevant blocks / screenshots in order that we can further advise.

I have 5 pages with same coding, only the DB tags are different

The list handling in the bar code event is very poor.
It looks like he is eating an artichoke.


An artichoke has lots of concentric leaves that need to be peeled off.

You ended up with a piece of text that has lots of [()] that needed to be removed.

okay, thanks for the joke and coding part works for me and my app.. but I really just wanna resolve my issue that is all. So if you cant help with my issue then rather dont reply

Your global variables may be part of your problem.

They lose their contents when you switch screens.

They can be avoided by working closer with TinyDB for your list view element loading.

Please export your project and post it here.

Here's a sample project that uses TinyDB directly, without global variables ...

thanks for helping.. But I feel bit uncomfortable putting my project on a open chat. Is it possible to do it more privately

I don't do private lessons, sorry.
We work in public so old lessons can be shared.

P.S. That ElementsFromString block looks like trouble.
Beware of automatic conversion between lists and text.
AI2 rubs your nose in it with [()] markup when you don't specify your conversion technique.

I must confess I have not used the scanner component yet.
But it has attributes of delayed results similar to other components that don't cross screen opening and closing well, like BlueTooth connections and Player operation.

I would suggest restricting your app to just one screen, using stacked vertical Arrangements, only one of them visible at a time.

Thanks for the help, I was actually thinking the same thing now. Looking at restricting to one screen because the app will get to big later.

Regarding my text earlier, about the {()} works for me. I am very very new to AI2 and it all started as a lockdown hobby which grew into something bigger. That is why I dont wanna change that blocks. I know it works..

To explain what it does:
Qr/ barcode scanner scans qr code and in my listview it gives me all that icons. With my blocks it basically comes out as I want.

Problem has been fixed..

Just incase someone else ever has the same problem, the use external Scanner must be unchecked.

1 Like

Thanks for telling us what the problem cause was.
That will help us the next time some one reports having a similar problem.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.