How to extend J2ME capabilities (eg, Bluetooth API) without access to JNI?
Posted on 2006-11-23
Ok - I need a real expert here, please bear in mind I've been doing J2ME on and off for about 4 years now, so I know a reasonable lot about the matter.
Here's the problem - I need to access Bluetooth devices on a particular phone (namely, XDA/SPV type devices) but the intalled KVM (namely, the crappy Intent JVM by Tao) does not support the Bluetooth API (JSR-82, I believe).
I would have no problem in writing the necessary C++ (native) classes/code to provide the functionality (in fact, I did exactly that for the iPaq to connect to a GPS bluetooth)
J2ME does not support JNI - so, how does one enable the connectivity? unless I am the phone manufacturer or the KVM writer.
I suppose one solution would be to write a "localhost" on the native side and connect to it from the JVM, but (a) this would not be really compliant with JSR and (b) I shudder thinking writing a server using Win32....