GeeCON Prague 2014*
The moose likes Java Micro Edition and the fly likes starting new midlet and destroying old one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "starting new midlet and destroying old one" Watch "starting new midlet and destroying old one" New topic
Author

starting new midlet and destroying old one

Onufry Niedziela
Greenhorn

Joined: Mar 22, 2006
Posts: 5
Hi,

Like in a subject. Is it possible to do? It's like first midlet is started and when in finishes it's destroyed and automatically next one is started, its got using http or from local emulator's path.

Any suggestions how to do it?

I was trying Midlet.platformRequest but when I pass it jad file or jar file name as a parameter it starts a web browser and tries to download a file using it. According to api spec it should work - new midlet should be installe. Did I do something wrong?

Thanks in advance.

Regards,
Onufry
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

I think I would ask what is the requirement for this type of design, that there is probably a better design to accomplish the goal easier.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Onufry Niedziela
Greenhorn

Joined: Mar 22, 2006
Posts: 5
What do you mean saying better design? I'm not J2ME expert and it's just some idea. The only requirement is to run many midlets one after another - each midlet should be in it's own midlet suite.

Onufry
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

The only requirement is to run many midlets one after another - each midlet should be in it's own midlet suite.



So, what I am saying, is that that "in itself" is the bad design. Why do you want to do this, where in the real world would this be a real requirement. You can accomplish a requirement in many ways, and one MIDlet starting another in its own MIDlet suite is not any solution to any requirement I have seen. I say look at what you really want to do, not "what is above". The only place I would have heard something as wrong as that requirement would be in a class at school.

Mark
Onufry Niedziela
Greenhorn

Joined: Mar 22, 2006
Posts: 5
Well, I can understand your point of view. But like I said this IS a requirement. Beceause of some memory limitations on the device that I'm using I cannot put all the midlets in one suite. Probably they will be provided using http. There is a server that provides midlet suites and device needs to get each of them, install and then ask for another. That's how it SHOULD be and I'm just asking for help how to do it. Do you get my point now?
Another sollution I was thinking about is a symbian c++ application that would make calls for these midlets but i don't have any idea if it's difficult doing it or not. Do you think that this may be a better design?

Onufry
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
You can try using PushRegistry.registerAlarm() but this will only enable you to start a MIDlet in the same suite. It may also not be supported by all devices.


Eduardo Marques
Get ready for your SCMAD certification at J2MECertificate.com - See what all the buzz is about ...
Onufry Niedziela
Greenhorn

Joined: Mar 22, 2006
Posts: 5
Originally posted by Eduardo Marques:
You can try using PushRegistry.registerAlarm() but this will only enable you to start a MIDlet in the same suite. It may also not be supported by all devices.


Yes, i know that. But If I have all the classes in one suite I don't need them to be midlets. I need some solution to run midlets from another suite.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Originally posted by Onufry Niedziela:


Yes, i know that. But If I have all the classes in one suite I don't need them to be midlets. I need some solution to run midlets from another suite.


I believe that the security that is set up that makes it so that you can't run another MIDlet that is in a different suite.

Mark
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
Yes, it is a security restriction.

Besides Push Registry alarms and the use platformRequest().
I believe one can't do much else with the standard J2ME APIs,
maybe the Symbian APIs with provide such a way (I am not familiar
with those ...).
[ March 26, 2006: Message edited by: Eduardo Marques ]
Onufry Niedziela
Greenhorn

Joined: Mar 22, 2006
Posts: 5
Ok, thanks for help. I'll think about another soultion. I guess the only choice I have is c++ symbian app.

onufry
 
GeeCON Prague 2014
 
subject: starting new midlet and destroying old one