Java Reference
In-Depth Information
will find a use for it. In Symbian OS, there are many other run-time
environments and very quickly some developers understood that this
opens up opportunities; for example, native applications can launch a
MIDlet or provide a MIDlet with services that it cannot get from the Java
ME APIs. Such interoperability can be achieved without breaking any
Java ME rule, guideline or specification. All it takes is a bit of creativity
and a small amount of work. Note that you are doing something which
is proprietary to Symbian OS and requires knowledge of native Symbian
C++ development.
Three questions frequently occur in discussions on this topic - can a
MIDlet suite be installed together with a native application, can a native
application launch a MIDlet and can MIDlets use the native Symbian OS
A MIDlet suite can be installed with a native application. The suite can
be bundled with the native application in the SIS file. 11 In exceptional
circumstances, when there is dependency between a MIDlet and an
associated native application, it may be convenient to deliver the entire
application in a single SIS file. By default, the user must manually install
the suite using a file browser. On some platforms, it is possible to automate
this process but the System Installer is a manufacturer-customizable
component and not all platforms support this behavior.
A MIDlet can be launched from a native application using the MIDP
Push mechanism. For example, the JAD attribute below shows static
registration of an inbound socket connection on port 5000, with no
address filtering, which activates PushMIDlet :
MIDlet-Push-1: socket://:5000, PushMIDlet, *
Using JSR-211 CHAPI, you can register your MIDlet to be a handler
for a specific type of content and use that mechanism to launch it from
native code.
There is no standard way to invoke native Symbian OS APIs from
CLDC, in general, or on Symbian OS, specifically. Java Native Interface
(JNI) is a powerful Java SE mechanism that enables desktop applications
to jump out of the Java run-time environment and execute native code
but CLDC does not include JNI. 12
3.8.3 Simulating Inter-process Communication
A recurrent question is whether it is possible to invoke native Symbian
OS APIs, either through Java Native Interface (JNI) or by using another
mechanism. The answer is that there is no standardized way to do so in
11 If you don't know what a SIS file is, refer to information about native development.
12 CDC-based platforms include JNI support but CDC is out of the scope of this topic.
Search WWH ::

Custom Search