Hey there,

I have a problem that many people had before and the forum is full of comments about this topic, but I couldn't find a completely working solution, ... so I apologize for bringing this up again.

Java ME application with C++ extensions
I'm a Java developer and know only little about Symbian C++ which is why the application I'm developing is pure Java ME for the most part. However, some things (like getting charger details or a list of available wifi access points) can't be done with J2ME.

For that reason, my goal is to extend the J2ME's application with native parts and then communicate via a socket. The socket communication already works thanks to some tutorials I found. However, the problem is that so far, I haven't been able to install/start both applications without the user knowing that it's two applications.

What I want:
  • Installation: The user shouldn't have to perform more than one installation. Is it somehow possible to seamlessly install an 'invisible' Java ME application which can then be launched by the C++ app? Or the other way round: Install a Java ME application and start the native app from it ...?! Do you see any other possibility to do this?
  • Starting/Launching: Same as with the installation; the user shouldn't know that there are two applications, but only have to start one. And once the application is running, only one should be in the visible in the application switcher (home-button).

How far I've come / What I've tried
Environment: Symbian S60, 3rd edition FP 1 (Nokia E71)

Task: Seamlessly install a Java ME application and a Symbian C++ program at the same time
  1. Solution 1: Installing Java apps and WRT widgets using sis files
    Issues: This solution actually works quite well. The only catch is that it installs separate applications, i.e., it installs a 'software installer' and then launches this installer to install the other components. The user has to confirm each install process and could theoretically reject each of the components... Not very seamless...

  2. Solution 2: Any ideas?!

Task: Seamlessly start a Java ME application and a Symbian C++ program at the same time
  1. Solution 1: Launching MIDlets programmatically on S60 3rd Edition
    Issues: The MIDlet is visible in the application menu, i.e., the user can start the Java ME application without the server

  2. Solution 2: A simple example (.exe) launching a midlet (Helloworld) from C++ code
    Issues: Doesn't work on my phone because z:\\system\\programs\\kmidrun.exe simply isn't there. Also, I've read in other forum post that it's not recommended to do it this way because this might change in future releases (seems it already has ..)

  3. Solution 3: Start the C++ program on device start-up and listen on a specific port, i.e., have a constantly running TCP daemon. Whenever the Java ME client is started, it can connect to the Symbian C++ server.
    Issues: I actually haven't tried this solution yet, but I know it's possible. However, I don't like this way, because this would mean that even though my application runs only ~1-5% of the time the phone is switched on, there will always be a daemon TCP server running in the background waiting for connections.

  4. Solution 4: Any ideas?!?!

I hope I have made myself clear. If you have any questions, feel free to ask.
Thanks for your help.