Attilah
Attilah

Reputation: 17932

Nokia 6600 battery status detecter

I need to write a mobile application (midlet) that will run on Nokia 6600 (SDK 60 2nd Edition CW). the application's goal is to detect power interruptions(whenever there is no more electrical power going into the battery) and log them.

this mobile application will be comprised of two modules :

  1. a J2ME module, mainly for interface stuff

  2. a Symbian C++ module, that will detect power interruption events and then inform the J2ME module that will log the power failure event (time and other data, etc...).

From what I gathered on this great website (StackOverflow), I have to use MIDP-JNI (http://wiki.forum.nokia.com/index.php/MIDletNativeServicesFramework ) to allow J2ME to interract with Symbian C++ code.

so my question is :

  1. should I make the Symbian module be the server and the J2ME module the client ? or can I do it the other way around ? (because I think that the part detecting power interruptions should be the client and whenever it detects an event, it calls the J2ME server .

  2. Can anyone provide me with a code sample ? I'm not a Symbian C++ programmer, so, it's a little bit difficult for me to deal with this.

Upvotes: 0

Views: 1349

Answers (2)

Pavel Alexeev
Pavel Alexeev

Reputation: 6081

In j2me you can try

System.getProperty("com.nokia.mid.batterylevel");

But I'm not sure if it works on 6600

Upvotes: 1

Mark Wilcox
Mark Wilcox

Reputation: 389

You'll need to learn Symbian C++ for this. The architecture for MIDP-JNI is basically a Symbian C++ server listening on a socket for the connection of a Java MIDlet - does that answer your question?

You can't really make the MIDlet a server because I don't think they can run in the background on a 6600. In any case, as I've commented on the question above, there doesn't seem to be any good reason to use Java ME and MIDP-JNI at all for this application.

Upvotes: 2

Related Questions