Barcode scanner not working

36 views
Skip to first unread message

Natanael Barbosa Santos

unread,
Jul 24, 2018, 2:23:48 PM7/24/18
to MIT App Inventor Forum
After last update, the barcode scanner aren't working

SteveJG

unread,
Jul 24, 2018, 2:54:30 PM7/24/18
to mitappinv...@googlegroups.com
Barcode scanner seems to work here whether using the external or external scanner.


Did you read the  BarcodeScanner documentation?  What is possible with App Inventor Blocks is discussed    
Are you using the internal or external scanner option?

  UseExternalScanner
If true App Inventor will look for and use an external scanning program such as "Bar Code Scanner."

What happens if you set UseExternalScanner to false? or to true  The component has its own code that is different from external scanning apps that may be on your device.

You need to tells more than the "scanner aren't working"  Nataneil.   What do your Blocks look like?   What type of barcode are you attempting to scan? 

...and is your camera lens clean?   

What exactly makes you thing the scanner is not working?   Are you using the DoScan Block?  Did you UPDATE you Companion to 2.47?  Are you testing on a device and are if using Companion, does the 'failure'  happen on both the Companion and when you compile your app.  Are you using a different device from when you last tested your app; if so what version of operating system is it using  Knowing things like this is important to help discover why you have issues.

Updated here, no problems.

Regards,
Steve





Natanael Barbosa Santos

unread,
Jul 26, 2018, 6:57:04 PM7/26/18
to MIT App Inventor Forum

My blocks ^


Natanael Barbosa Santos

unread,
Jul 26, 2018, 7:02:05 PM7/26/18
to MIT App Inventor Forum
The same code works in the older version, but in the current version it does not. Also not work the MIT Companion App (same network)

SteveJG

unread,
Jul 26, 2018, 8:03:57 PM7/26/18
to MIT App Inventor Forum
Try this example without renaming the component.  Use two Buttons and try each.

If you have an external scanner app on your device, the code in Button3 should work.  If you do not, you can use the component using the code in Button1.

You might also clean your camera lens;  try scanning a different bar code etc.

You said "same code works in the older version, but in the current version it does not."  .. What older version? What current version?     When it does not work, what happens?  Do you get a wrong result or what?
Are you using this with the same device as you used on your 'older' version?   Since the scanner makes use of the device's camera, does the new device have a fixed focus lens; devices with a fixed lens sometimes cannot do 
a scan unless the barcode is well illuminated.

If neither Button works, tell us about your Android device.  What operating system does it use?   What kind of barcode are you attempting to read?   An image capture of the bar code posted to the Forum might help.



Reply all
Reply to author
Forward
0 new messages