Solved

How to extend J2ME capabilities (eg, Bluetooth API) without access to JNI?

Posted on 2006-11-23
4
930 Views
Last Modified: 2008-03-17
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)

BUT

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....

Any suggestions?

Many thanks,
Marco
admin@infinitebw.com
0
Comment
Question by:massenz
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:sreenathk
ID: 18005787
Hi,

 I am working in the same field for 5 years. When I saw your problem.. I thought only one answer. That is NO you can not access.

 If the JVM (or KVM) does not support the native calls of Blue tooth using KNI (similar to JNI), there is no way a application can access blue tooth using the JAVA Application.

 For Application ot use Blue tooth, the VM should suport Blue tooth classes either by JSR or by Native implementaion supprt by KNI.

Without that, I am afriad you can not do it.

If anybody have other way of doing please let us know.. we need it..

Sreenath
0
 
LVL 1

Author Comment

by:massenz
ID: 18008563
Sreenath - well, thanks... a bit disappointing, really...

anyone from Sun here?
is this THE single most serious shortcoming of J2ME?

Best,
Marco.
0
 
LVL 3

Accepted Solution

by:
sreenathk earned 500 total points
ID: 18089838
As far as I know.. If JVM (or KVM) does not support functionality either in the VM or in JSRs or in Native inplementation, we can not do anything with the application.

Sreenath
0
 
LVL 1

Author Comment

by:massenz
ID: 18091591
Well - after further investigation, it turns out that, sadly, it is NOT possible to extend in ANY WAY the KVM capabilities if CLDC config is supported

HOWEVER, if CDC config is supported, then JNI apparenly is available (eg one of the SonyEricsson model provides it) and then JNI can be used.

Not great, really - but that's life, I suppose.

Cheers,
M.
0

Featured Post

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Join & Write a Comment

For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
DECT technology has become a popular standard for wireless voice communication. DECT devices are not likely to be affected by other electronic devices and signals because they operate in a separate frequency-band.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now