I'm connecting to a barcode scanner and reading scans from it.
I'm having trouble handling the case where the scanner goes
out of range, buffers a few scans, then comes back within range.
For some reason, the scanner loses some or all of the buffered
data during the process of reconnecting.  I get an IOException
when the scanner is out of range, and I close the Bluetooth
InputStream, OutputStram, and BluetoothSocket.  Then I attempt
to connect to the scanner again, every three seconds until that
is successful.  For some reason, actually only on some devices,
the scanner loses some of the early scans, or in some cases all
of the scans it has in its buffer.  On my phone it works fine,
but on my tablet I get this problem.

Now the scanner company sells an app for $50 that handles
communication with the scanner, and I could communicate with
that app through their Intent() API.  That app somehow handles
this case flawlessly.  The problem is that we are looking at
deploying hundreds of units, and the license fee is an obstacle.

So the question is as to whether there are some more steps I
need to take into account when handling a bluetooth device that
may get turned off, or go out of range during use.

Thanks,

Tobiah

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to