11-03-2009 02:24 AM - edited 11-03-2009 04:10 AM
I have an application running on a Symbian platform using a J2ME Midlet that communicates with a native application using TCP as a communication platform. Having read about communication between applications on Blackberry I understand that loopback communication is not supported on Blackberry. In other words, the J2ME Midlet is not fully supported on the Blackberry platform?
From Wikipedia: ( http://wiki.forum.nokia.com/index.php/MIDletNative
Just as a MIDlet can communicate with applications running on remote hosts using standard communications protocols, so a MIDlet running on Symbian OS can communicate with another application running on the same host using the local loop back address (127.0.0.1).
11-03-2009 03:18 AM
I don't think J2ME mandates the ability of MIDlets to communicate with each other via the loopback interface.
You could try the dirty and evil solution of clients and servers on the same device communicating via the cellular or WiFi interface: http://supportforums.blackberry.com/t5/Java-Develo
11-03-2009 04:09 AM
Thanks klyubin but as you say "the dirty and evil solution" is not really a viable solution.
The J2ME Midlet was designed to be a sort of minimum platform accepted by all. And it does support
11-03-2009 04:49 AM - edited 11-03-2009 04:51 AM
I can't find any reference to localhost/loopback connections in CLDC-1.1 (http://jcp.org/aboutJava/communityprocess/final/js
11-03-2009 05:10 AM
I will check back on the original creator of the midlet if it is something that Symbian has added just for their platform. It works on the symbian
11-03-2009 10:18 AM
The midlet in question is developed with Borland JBuilder. If the developer would like to incorporate code to have an alternate way of communicating to Blackberry via Global Events when talking to a Blackberry phone instead of using TCP (which is the way to talk to a Nokia Symbian) I assume this can be done.
The questions then are:
- How to identify that the phone is Backberry not a Symbian?
- What has to be imported to get the functionality for Global Events?
11-03-2009 10:56 AM
The most straightforward and powerful way would be to build the application for BlackBerry as a RIMlet (i.e., conventional BlackBerry Java application instead of a MIDlet). In this case you'll get access to all the necessary APIs.
11-03-2009 01:02 PM
The application developer of the midlet wants to keep just one general version. The whole purpose of using a midlet for the main application is to be as general as possible in order to keep the customisation for all different brands of hardware to the minimum. Starting point was Symbian hence the TCP communication vehicle. Obviously Symbian supports internal TCP communication since the application works for Nokia. There are some more hardware close functionality that is written in Symbian native code and that is the code I have to develop for Blackberry and another person for Windows mobile. One of the functions is to listen to the occurrence of outgoing calls so the midlet and the function code are running in separate threads and need to communicate with each other.
So I guess its a trial and error approach trying to incorporate blackberry API code to the existing midlet
11-03-2009 01:12 PM - edited 11-03-2009 01:15 PM
No, it's not a trial error approach. It's pretty straightforward: either you build a MIDlet which is limited to CLDC and MIDP APIs, or build a RIMlet and can use all BlackBerry APIs. You can do some trickerly, like building an additional library module containing classes that you can instantiate by name using reflection from your MIDlet, but I doubt that you'll be able to solve your issue with one MIDlet only.
P.S. If CLDC/MIDP let you instantiate a MIDlet on demand, then your main MIDlet could register the PhoneListener which will instantiate a new MIDlet every time a call comes in.
05-10-2010 12:33 PM
I am bumping up against this limitation as well. Desperately want a loopback for MIDlets on the Blackberry, but no luck. I think it's becuase the "localhost" address ranges are used by the enterprise backbone.
So, I'm looking at writing a RIM application that will use GlobalEvents.
That I know of, the J2ME specifications are silent on the loopback question. I think it's just generally assumed that loopback would be there somehow. But, I don't think it's required, so RIM takes advantage of it....
Makes sense in a way, but I wish RIM was better with the documentation explaining this....