Barcode reader Android

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 738
Joined: Thu Sep 11, 2014 1:49 pm

Barcode reader Android

Post by mrcoollion » Mon Nov 14, 2016 7:22 pm

I cannot seem to grasp how to make a barcode reader with mergeAV mergAVCamStartBarcodeReader :shock: .
It is pretty important for me to make this work as it is a mayor part of a piece of business software I am developing.
Hope someone can help me :mrgreen:

- I used http://mergext.com/home/mergav/ as a guide.
- Target platform is android.
- Selected mergeAV in the inclusions

Only two buttons.
One to show all barcode types available (does not work)
One to get barcode
One field that I want to show the text of the barcode.

'Show all barcode types' button code:

Code: Select all

on mouseUp
   put mergAVCamBarcodeTypes() into barcodetypesdata
   answer "Alle barcode types supported: ",CR,barcodetypesdata
end mouseUp
'Get barcode'button code:

Code: Select all

local pBarcode, pBarcodeType
on mouseUp
   --  mergAVCamStartBarcodeReader
   -- message mergAVCamBarcodeFound pBarcode,pBarcodeType
   put empty into pBarcodeType
   put empty into pBarcode
   if the label of me = "Scan barcode" then
      set the label of me to "Stop Scanning"
      mergAVCamStartBarcodeReader 
   else
      set the label of me to "Scan barcode"
      mergAVCamStopBarcodeReader
      answer "Stopped scanning for barcodes!"
   end if
end mouseUp

on mergAVCamBarcodeFound pBarcode,pBarcodeType
   --  Parameters:
   -- pBarcode - the text or number read from the barcode
   -- pBarcodeType - the type string for the barcode
   answer "Barcode text or number read: ",pBarcode
   put pBarcode into fld "BarcodeText"
end mergAVCamBarcodeFound

on mergAVCamBarcodeFinished
   answer "Barcode finished with following text or number read: ",pBarcode
end mergAVCamBarcodeFinished
In the attached zip file you will find the livecode stack of which I build the apk for android.
Attachments
BarcodeReader_V01.zip
Test barcode stack
(2.04 KiB) Downloaded 286 times

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Barcode reader Android

Post by Mikey » Tue Nov 15, 2016 2:33 pm

1. As of today, mergAV doesn't run on Android.
2. Email Monte to see if he has plans to port it
3. You can see what platforms an external is compatible with by going to File->Standalone Application Settings->Inclusions. Scroll down to the component you are interested in and on the right you will see the platforms it works with.
4. As of right now, if you include any of the "merg" externals, you have to manually select them from the Inclusions list - LC's standalone builder does not automatically include them. Note that to manually include components, on the FIRST standalone settings screen, flip the radios from auto to manual.

mrcoollion
Posts: 738
Joined: Thu Sep 11, 2014 1:49 pm

Re: Barcode reader Android

Post by mrcoollion » Tue Nov 15, 2016 6:35 pm

If MergeAV barcode part is not running on android is there another do-able way to have a barcode scanned from within my livecode stack on IOS and Android mobile devices with use of the build in camera?
Maybe by using a third party application controlled from within my stack?

I am pretty disappointed that this does not work :cry: .

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Barcode reader Android

Post by Mikey » Tue Nov 15, 2016 6:48 pm

Like I said, it works great on ios. Email monte, or check the bug reports at quality.runrev.com to see if there is a status on porting to android. As for some other option on Android, I don't know.

mrcoollion
Posts: 738
Joined: Thu Sep 11, 2014 1:49 pm

Re: Barcode reader Android

Post by mrcoollion » Tue Nov 15, 2016 7:10 pm

Thanks for your answer Mickey :D .
There seems to be no status on MergeAV at all at quality.runrev.com.

Might be a good Idea for me to file it as a bug?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Barcode reader Android

Post by Mikey » Tue Nov 15, 2016 7:12 pm

what I meant was, check to see if there already is an enhancement request. if there is not, then sure, go for it.

Post Reply