Can A Midlet invoke another Midlet?
Asked Answered
S

3

7

I been looking around and at sources like this one they say that a Midlet can invoke another if they are in the same suite, or if they are in the same namespace and in the same jar file.

I do not understand what a Midlet-Suite is?

Also after searching through the web I did not find any documentation or code examples for One Midlet invoking another Midlet.

Semitropical answered 18/8, 2009 at 18:23 Comment(1)
Cool. Never heard of MIDlets before. en.wikipedia.org/wiki/MidletIetta
M
3

The other replies are pretty much taking care of your questions about MIDlet Suites but I would suggest reading the MIDP specification to get the information first-hand:

http://www.jcp.org/en/jsr/detail?id=118

On recent phones (Series60 5th edition from Nokia Sony-Ericsson and Samsung, other Sony-ericsson phones), the Content Handling API (CHAPI) is supported for MIDlet-to-MIdlet invocation. That's JSR-211. You can read the specification for that here:

http://www.jcp.org/en/jsr/detail?id=211

The latest version of the Nokia Java Developers Library will contain more explanation:

http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Java/

The latest JavaME SDK will contain CHAPI code examples:

http://java.sun.com/javame/downloads/sdk30.jsp

Edit: CHAPI is also available on non-Symbian Nokia phones from Series 40 5th Edition, Feature Pack 1 onward, according to the Nokia Java Developers Library. You can find which nokia phone is running which version of Series40 at:

http://www.forum.nokia.com/devices/matrix_all_1.html

Misrepresent answered 19/8, 2009 at 10:6 Comment(1)
Thanks, Can I implement this on older phones like the Nokia S40 series?Semitropical
W
4

A MIDlet suite is basically the JAR file. There are many J2ME applications that contain several MIDlet classes in the jar, see some of Sun's examples that come with WTK.

Edit: There's an example called MMAPIDemos that comes with sun's WTK that uses 3 MIDlets in one suite.

Wincer answered 18/8, 2009 at 18:28 Comment(0)
C
3

You can try PushRegistry as a more generic way. You should be able to launch MIDlets from other suites as well. Try this link for more information.

Christadelphian answered 18/8, 2009 at 18:50 Comment(4)
Thanks, Can the Invoking Midlet destroy itself as soon as It invokes the new Midlet?Semitropical
There is no such requirement. But most KVMs only support 1 active midlet at a time. That probably means your first midlet will go into paused state.Christadelphian
Won,t the paused midlet be using up precious resources of the mobile, I wanted to destroy the Midlet to free up resources.Semitropical
I guess it will still keep resources. But once you launch another midlet, using any method same thing will happen. Maybe one thing you can do is. 1. Register a timer for midlet A. 2. Launch midlet B. 3. Register a timer for midlet B. 4. first timer activates A, kill A. 5. Second timer will activate B and you can keep going from there on. I hope this helps somehow.Christadelphian
M
3

The other replies are pretty much taking care of your questions about MIDlet Suites but I would suggest reading the MIDP specification to get the information first-hand:

http://www.jcp.org/en/jsr/detail?id=118

On recent phones (Series60 5th edition from Nokia Sony-Ericsson and Samsung, other Sony-ericsson phones), the Content Handling API (CHAPI) is supported for MIDlet-to-MIdlet invocation. That's JSR-211. You can read the specification for that here:

http://www.jcp.org/en/jsr/detail?id=211

The latest version of the Nokia Java Developers Library will contain more explanation:

http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Java/

The latest JavaME SDK will contain CHAPI code examples:

http://java.sun.com/javame/downloads/sdk30.jsp

Edit: CHAPI is also available on non-Symbian Nokia phones from Series 40 5th Edition, Feature Pack 1 onward, according to the Nokia Java Developers Library. You can find which nokia phone is running which version of Series40 at:

http://www.forum.nokia.com/devices/matrix_all_1.html

Misrepresent answered 19/8, 2009 at 10:6 Comment(1)
Thanks, Can I implement this on older phones like the Nokia S40 series?Semitropical

© 2022 - 2024 — McMap. All rights reserved.