Android BarCode Scanner Widgets not working

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Android BarCode Scanner Widgets not working

Post by yunior.portilla » Sat May 30, 2020 5:45 pm

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.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 927
Joined: Fri Aug 15, 2008 7:15 am

Re: Android BarCode Scanner Widgets not working

Post by bangkok » Sun May 31, 2020 1:59 am

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.

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » 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? :)

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 927
Joined: Fri Aug 15, 2008 7:15 am

Re: Android BarCode Scanner Widgets not working

Post by bangkok » Tue Jun 02, 2020 1:28 am

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

sphere
Posts: 1109
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Android BarCode Scanner Widgets not working

Post by sphere » Tue Jun 02, 2020 1:36 pm

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.

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » Tue Jun 02, 2020 2:30 pm

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?

sphere
Posts: 1109
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Android BarCode Scanner Widgets not working

Post by sphere » Tue Jun 02, 2020 5:24 pm

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

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » Tue Jun 02, 2020 7:10 pm

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

sphere
Posts: 1109
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Android BarCode Scanner Widgets not working

Post by sphere » Wed Jun 03, 2020 12:00 pm

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.

Klaus
Posts: 12132
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Android BarCode Scanner Widgets not working

Post by Klaus » Wed Jun 03, 2020 12:03 pm

Recently Heather told me that one needs only 7 (SEVEN) postings before one can post links, images etc.

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » Wed Jun 03, 2020 7:20 pm

Thanks Klaus,

Dentro de poco llego a los siete posts :D

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » 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?

Klaus
Posts: 12132
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Android BarCode Scanner Widgets not working

Post by Klaus » Wed Jun 03, 2020 7:34 pm

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

sphere
Posts: 1109
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Android BarCode Scanner Widgets not working

Post by sphere » Wed Jun 03, 2020 9:01 pm

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.

yunior.portilla
Posts: 24
Joined: Sat May 30, 2020 12:50 am

Re: Android BarCode Scanner Widgets not working

Post by yunior.portilla » Wed Jun 03, 2020 9:51 pm

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.

Post Reply

Return to “Android Deployment”