pashaoleynik97 / GSBarcodeScannerHelper

Simple library that helps to use GeneralScan SDK (painless callbacks and initialization).
1 stars 0 forks source link

Replace empty string from read data? Is it correct? #1

Open matak opened 5 years ago

matak commented 5 years ago

Hi, firstly thanks for your effort, GS need it! :)

I would like to ask on this row

https://github.com/pashaoleynik97/GSBarcodeScannerHelper/blob/master/gsbarcodescannerhelper/src/main/java/com/github/pashaoleynik97/gsbarcodescannerhelper/BarcodeScannerHelper.java#L143

does it mean that your remove all empty strings from barcode? Bcs, empty string is valid part of some barcodes, i know that not EAN13, but CODE 128 why not?

Also does it mean that you recognize the end of barcode by the timestamp diff more than 100ms from start of reading? Would it be better to wait for \r\n, for my purpouse is 100ms too much and also the mobile phone can at this moment have something to do, and the response could be more than 100ms and still it is in the middle of reading barcode.

thanks for answer

pashaoleynik97 commented 5 years ago

Hi! Thank you for your message! You are right, this line is not correct. Indeed it was not taken into attention, that barcode may contain spaces. I will fix it soon. I think, that I can make something to give an opportunity to programmer to choose if he want to remove spaces or not.

I will close this issue after fix.

Thank you for your attentiveness :)

matak commented 5 years ago

perfect, thanks, but, do you know that long time GS have new libraries, which are different? dont have session listener etc.