Page 1 of 2

Android BarCode Scanner Widgets not working

Posted: Sat May 30, 2020 5:45 pm
by yunior.portilla
Hello everyone

I am developing an android application that needs to read the information from a QR Code.

I am using the Android Barcode Scanner widgets, it lifts the camera well inside the application but it does nothing, the barcodeDetected messages do not run.

I gave him all the permissions and nothing.

Re: Android BarCode Scanner Widgets not working

Posted: Sun May 31, 2020 1:59 am
by bangkok
Which version of LC do you use ?

A bug related to QR Code was fixed recently in LC 9.6 dp 4

Bug report here :
https://quality.livecode.com/show_bug.cgi?id=22609

So that' s the first thing to check.

Re: Android BarCode Scanner Widgets not working

Posted: Mon Jun 01, 2020 10:37 pm
by yunior.portilla
Hello

Check everything from the link you gave me. Download the last stable version LC Indy 9-6-0 :D and I'm testing the widget that also brings more functionalities and the dimensions of the widget have been solved :shock: .

However, I still have the same problem, the camera of the device lifts me perfectly, but it does not read the QR code :( . From what the documentation says, the application needs to download from the internet the first time that a Google service package is run.

Would there be a way to distribute the application with that package already in the application? :)

Re: Android BarCode Scanner Widgets not working

Posted: Tue Jun 02, 2020 1:28 am
by bangkok
Just to be sure, try this apk.

-created with a simple stack (LC Indy 9.6)
-with just 1 barcode scanner widget
-and a script to display the data scanned

On my Samsung phone (android 7.1.1), it reads any barcode, included QR code, even on a computer screen like https://www.unitag.io/fr/qrcode

https://www.dropbox.com/s/a6w34apl4aheu ... 1.apk?dl=0

Re: Android BarCode Scanner Widgets not working

Posted: Tue Jun 02, 2020 1:36 pm
by sphere
yunior.portilla wrote:
Mon Jun 01, 2020 10:37 pm
Hello

Check everything from the link you gave me. Download the last stable version LC Indy 9-6-0 :D and I'm testing the widget that also brings more functionalities and the dimensions of the widget have been solved :shock: .

However, I still have the same problem, the camera of the device lifts me perfectly, but it does not read the QR code :( . From what the documentation says, the application needs to download from the internet the first time that a Google service package is run.

Would there be a way to distribute the application with that package already in the application? :)
You need to have Google Services installed in your Android SDK, either via command line or via Android Studio, it's a package you can select to install.

It has nothing to do with a first run.
Make sure you include the libraries.

Re: Android BarCode Scanner Widgets not working

Posted: Tue Jun 02, 2020 2:30 pm
by yunior.portilla
Thanks bangkok and sphere

I have been working with LiveCode since it was Revolution and I give it a lot of promotion in Cuba, especially in Education, which is where we use it most in my center for the development of educational applications.

Download the examples you sent me now I test on various devices with different versions of android.

I tell them to compile with LC Indy an example and start testing it on various devices and it worked GREAT with android 6-01 at first isOperational () gave me false then true. Check the data usage and download something for the google service bundle. It really is working fantastic.

From the suggestion of sphere check my SDK with Android Studio and I have the versions of Google Play Services (rev 16, 19, 22, 26, 39, 49); would I have to download others to ensure that the scanner works on other versions of android?

Re: Android BarCode Scanner Widgets not working

Posted: Tue Jun 02, 2020 5:24 pm
by sphere
Great!
as of LC9.5.1 you need minimum Android 5 as dependency for LC, correct me if i'm wrong.

On 1 laptop i have this(the old way command line tools), on another PC i use android Studio
sdk-1.PNG
sdk-2.PNG
sdk-3.PNG

Re: Android BarCode Scanner Widgets not working

Posted: Tue Jun 02, 2020 7:10 pm
by yunior.portilla
Hello

In LC 9-5-1 it lets me compile from 4-1 Jelly Bean onwards. Already at 9-6-0 if it is from version 5 of Android Lollipop.

It seems that I do not have permissions to view the images you sent me. If you could upload it somewhere for me to download it I would appreciate it.

Thank you

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 12:00 pm
by sphere
yunior.portilla wrote:
Tue Jun 02, 2020 7:10 pm
It seems that I do not have permissions to view the images you sent me. If you could upload it somewhere for me to download it I would appreciate it.
I think you need 5 more posts, then you can see them and also place images yourself and attach files.

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 12:03 pm
by Klaus
Recently Heather told me that one needs only 7 (SEVEN) postings before one can post links, images etc.

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 7:20 pm
by yunior.portilla
Thanks Klaus,

Dentro de poco llego a los siete posts :D

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 7:21 pm
by yunior.portilla
Hello Klaus

From the suggestion of sphere check my SDK with Android Studio and I have the versions of Google Play Services (rev 16, 19, 22, 26, 39, 49); would I have to download others to ensure that the scanner works on other versions of android?

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 7:34 pm
by Klaus
Hola Yunior,
yunior.portilla wrote:
Wed Jun 03, 2020 7:21 pm
Hello Klaus

From the suggestion of sphere check my SDK with Android Studio and I have the versions of Google Play Services (rev 16, 19, 22, 26, 39, 49); would I have to download others to ensure that the scanner works on other versions of android?
sorry, I do not own any mobile device (yes, no cellphone, that's me!) and I don't develop for mobile. 8)
So I have to pass this question to someone else...


Best

Klaus

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 9:01 pm
by sphere
You don't need all versions to have it working on several Android platforms.
For the sdk you need a least sdk Android 5.01 and API 21. (also depending on the LC version for what the minimum is)
For the Google Services i only have 49 installed. (i only use the latest)
Then it should work on all Android versions above 5.01. You can also set it in the Android Standalone settings to use Android 5.
Then it will run on the Android processors you also select in the Standalone settings like ARMv7 ARM64.

Re: Android BarCode Scanner Widgets not working

Posted: Wed Jun 03, 2020 9:51 pm
by yunior.portilla
Thank you very much anyway Klaus.

Very interesting about not having a cell phone, in China I met a friend who did not want to have a cell phone either and had all the possibilities.