Open GoogleCodeExporter opened 9 years ago
There is no guide as such, so here are some info points:
1) Each "driver" must be in its own class
2) Each driver must implement BluezDriverInterface, but really should derive
from RfcommReader or HIDReaderBase, whichever fits the best.
3) And it should have the static methods public static int[] getButtonCodes()
and public static int[] getButtonNames() methods
4) After implentation, add to the list here:
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/BluezService.java#33
The implementation is not fully plug-n-play so you need to add the driver to:
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/ButtonConfiguration.java#121
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/BluezService.java#324
The simplest example is the BGP100 driver:
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/BGP100Reader.java
All that is really done here is in the parseInputData() method:
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/BGP100Reader.java#110
From that example you can see that the incoming data is parsed to figure out
what button has been pressed/released and a keypress event is then broadcasted:
http://code.google.com/p/android-bluez-ime/source/browse/trunk/BluezIME/src/com/
hexad/bluezime/BGP100Reader.java#174
That is all there is too it. Let me know if you need more info.
Original comment by kenneth@hexad.dk
on 4 Nov 2012 at 11:41
Original issue reported on code.google.com by
adi...@eddywebs.com
on 27 Oct 2012 at 8:16Attachments: