I'm using a generic usb powered credit card (magnetic) hardware reader
on my application. I can open up notepad on a PC just fine and scan
and all of the characters are displayed (albeit very fast). If i hook
the device up to my android emulator eclipse environment, as i scan -
it works however it sends only part of the text on the card every
time, and every time it's randomly different.. usually teh first 7 or
so characters are correct then it's a crapshoot as to what characters
come next, then it finishes right sometimes. Same thing when i hook
the usb device up to my android tablet, it scans, just acts like it
types too fast and android can't keep up.
My guess is that i'm filling up the keyboard buffer... if so, how can
i change the size of this?
my code is below:
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.getUnicodeChar() != 0)
{
ScannedText += (char)event.getUnicodeChar();
txt_scan.setText(ScannedText);
}
}
and this function exists in the hierarchy of my main activity...
essentially the whole app is listening for this function no matter
where i am in the program... would it help to attach this to a
specific view?
Thanks
//
--
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