Help to bind Zxing library to scan barcode on Android

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
yunior.portilla
Posts: 20
Joined: Sat May 30, 2020 12:50 am

Help to bind Zxing library to scan barcode on Android

Post by yunior.portilla » Wed Jun 17, 2020 5:42 pm

I'm trying to use the ZXing library from LiveCode Builder to create a barcode reading mechanism, but it doesn't work for me, it must be that I'm doing something wrong.

I am stuck and actually the new LiveCode Barcode Scanner widget requires the Google Play Service functionalities, which makes my app not run on devices that don't have Google Play Service.

In ZXing the IntentIntegrator class is invoked and the initiateScan method is passed to it, that in Android Studio works perfectly for me, raise the camera and scan perfect ...

The results are returned in onActivityResult ... If you could bind these methods from LiveCode Builder awesome. I copied the core and embedded ZXING libraries to the code / jvm-android folder to my LCB project, but it did not work.

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

Re: Help to bind Zxing library to scan barcode on Android

Post by yunior.portilla » Thu Jun 18, 2020 9:22 pm

I downloaded the .jar from the XZing site and incorporated it into my LCB project at code / jvm-android however when I make the calls it didn't work. I share the code to see where I am failing.

The code has other examples that I put into practice following the basic example of using an external java library.

Thank you.
Attachments
yBarcode.rar
(24.02 KiB) Downloaded 12 times

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

Re: Help to bind Zxing library to scan barcode on Android

Post by Klaus » Fri Jun 19, 2020 8:07 am

Hi yunior,

please only one thread per issue!
Will delete your posting in the ANDROID forum, LivecodeBuilder seems to be the correct forum for this..


Best

Klaus

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

Re: Help to bind Zxing library to scan barcode on Android

Post by sphere » Fri Jun 19, 2020 10:26 am

why don't you sideload Google apps on those devices?
That's maybe a simpler solution than the path you try to walk now.
Check https://opengapps.org/ and https://wiki.lineageos.org/gapps.html

It's also used by people who install LineageOS which does not incorporate company's bloatware.

Sometimes you need another loader, and sometimes you can sideload it via an APK. Check and search for Gapps. There are also light versions, just see what you need for the minimum to get it working.

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

Re: Help to bind Zxing library to scan barcode on Android

Post by yunior.portilla » Thu Jun 25, 2020 6:43 pm

I am obliged for my application to provide a solution independent of Google Play services, lately there are many versions of the operating system that do not have the services of Google Play Service, which means that the excellent Android barcode Widget does not work for me on those devices.

Currently he worked on an educational project that needs to read a Qr code to obtain the student's data, and for example in China Google services are not used so my application does not work there.

Hence my need to find a solution with ZXING as the MergZXing barcode reader variant for IOs that LiveCode has.

In this endeavor I tried to bind liveCode with .arr android-zxing-embbebed.aar but it didn't work for me.

I am preparing an example to share it to see if you can help me.

Regards

Post Reply

Return to “LiveCode Builder”