Barcode scanner problem when starting horizontally in codename one

39 views
Skip to first unread message

Akash Kubavat

unread,
Oct 27, 2014, 5:54:23 PM10/27/14
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: Win 8
Simulator : NA
Device: Android tablets

Hello Shai / codename team,

I come across a strange issue regarding barcode scanner in Android tablets.

My screen is having one textfield, which set barcode scanned value
retrieved in scanCompleted() method.

Now the problem is something like this,
1) if tablet is hold vertically and you start barcode scanner by codeScanner.scanBarCode()..
 - it ALWAYS scan CORRECT barcode value
 - it always SET value to text field

2) (now go back to main textfield screen and)hold tablet horizontally and if you start barcode scanner..
 - it ALWAYS scan CORRECT barcode value
 - it NEVER SET value to text field

so the problem with barcode in tablet is, POSITION of tablet, when we START BARCODE SCANNING screen

This happens every-time with Samsung Galaxy Tab4 (OS 4.4.2).

In Phone handset,
- vertically works perfect always,
- while horizontally, intermittent (means not like tablet that never set value)

Please, if you have time then, can you check or say it is in the case of Galaxy Tab4 only or with other tablets also..

FYI: I am getting the result in LOG CAT, like:
       10-28 10:48:09.814: D/Receipt(6690): [EDT] 25:1:42,199 - Contents of scan are 50375264
       So method return value correct, but it does not set the value to the field. Strange.

Thanks,

Shai Almog

unread,
Oct 27, 2014, 9:41:56 PM10/27/14
to codenameone...@googlegroups.com
Some QR/bar code scanners have some flakiness in relation to the devices natural orientation. There isn't much we can do about it.
Some developers reported better results when working with the zbar QR/barcode reader on Android: http://codenameone.com/cn1libs.html
Reply all
Reply to author
Forward
0 new messages