Groups > Symbian > Symbian EPOC Java > Re: Java in a sandbox r java with full access??




Java in a sandbox r java with full access??

Java in a sandbox r java with full access??
Fri, 6 Jan 2006 12:33:53 -0000
Hey guys, i'm just confused by something here,

I am thinking of an application that runs in the back ground and on some
event gets brought to the forground. However from reading some articles
(mainly on forum.nokia) it seems that a lot of java coding can only be
performed in a sandbox.

I realise my watcher Application has to be written in C, but i was under the
impression that it would then be able to lauch a Java  application when
required. However if my java application is surrounded by a sandbox, and
unable to access the parameters i'm looking for (mainly signal level) its
not much good to me!

any ideas... or what are the limitations with java on symbian handsets?

thanks in advance,

Liam

Post Reply
Re: Java in a sandbox r java with full access??
Fri, 6 Jan 2006 14:16:19 -0000
MIDP Java does run in a sandbox. The limits of the sandbox are essentially
defined by the MIDP API set and any optional API set supported by the phone,
things like
Wireless Messaging API
Mobile Media API
File Connection API
PIM API etc etc.

MIDP Java doesn't support JNI so you can't extend the Java functionality,
over and above the closed set (MIDP + optional APIs) supported by a
particular phone. Having said that there is a trick you can use to
communicate with native code - namely a socket connection using localhost,
see http://www.midpjni.com

According to the MIDP spec, a MIDlet can only be launched by the Application
Management Software (AMS), a software component that is part of any MIDP
implementation. So when a user selects a MIDlet icon, what happens is the
AMS launches the VM, to run that particular MIDlet (suite). The AMS is
responsible for managing the lifecycle of that MIDlet (for example pausing
the MIDlet in response to an incoming phone call for example). It is
possible to launch a MIDlet from a native application using the AMS and a
MIDP 2.0 API called the Push Registry. Again this involves a socket
connection over localhost. Basically you register the MIDlet with the AMS to
be launched in response to an in-coming connection on a particular port.

Regards
Martin

"Liam Hartley" <liam.hartley@nuigalway.ie> wrote in message
news:EZHr7xrEGHA.2088@extapps30...
> Hey guys, i'm just confused by something here,
>
> I am thinking of an application that runs in the back ground and on some
> event gets brought to the forground. However from reading some articles
> (mainly on forum.nokia) it seems that a lot of java coding can only be
> performed in a sandbox.
>
> I realise my watcher Application has to be written in C, but i was under
the
> impression that it would then be able to lauch a Java  application when
> required. However if my java application is surrounded by a sandbox, and
> unable to access the parameters i'm looking for (mainly signal level) its
> not much good to me!
>
> any ideas... or what are the limitations with java on symbian handsets?
>
> thanks in advance,
>
> Liam
>
>

Post Reply
about | contact