aspose file tools*
The moose likes Java Micro Edition and the fly likes Background midlet on startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Background midlet on startup " Watch "Background midlet on startup " New topic
Author

Background midlet on startup

Abhijit Chandekar
Greenhorn

Joined: Jul 27, 2005
Posts: 7
hi,
Is it possible to start a background thread in j2me ?
I always do this in BlackBerry.
PLz tell something ! I need it.

Thanks,
Abhijit Chandekar
Yuri Magrisso
Ranch Hand

Joined: Sep 13, 2003
Posts: 58
Sure, just like in J2SE - use Thread and Runnable.
Abhijit Chandekar
Greenhorn

Joined: Jul 27, 2005
Posts: 7
hello,
Yes i can use a thread, but when i close the midlet, the thread gets closed too !
I want to run an midlet thread in the background contineously !

1) Can i run more than 1 midle at a time .
2) Can i have a MIdlet that starts at the start up of the device as in BlackBerry ?

Plz help !

Thanks,
Abhijit Chandekar
Yuri Magrisso
Ranch Hand

Joined: Sep 13, 2003
Posts: 58
It depends on the particular phone.
Some phones like Motorola i730 have an option to start a program when the phone powers on.
You can put an application in the background by calling MIDlet.notifyPaused(). Usually the application continues to execute its threads on the background.

You can autostart application also by using the PushRegistry.

I haven't tried that one, but you should check out what will happen if you don't set a screen in MIDlet.startApp(), but call MIDlet.notifyPaused() instead - this should put the application in the background immediately when it starts.
Rasika L Deshmukh
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Hi,
Have you solved the problem of running the midlet in background.
Please tell me code or the solution for the same.
Its urgent..........

Thanks in advance.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
hey how is it done using blackberry? can we use j2me for developing apps for it? or do i need an another simulator for it?


Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
Rasika L Deshmukh
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Hi,
For j2me we require another simulator.
In blackberry we can make a project to run in background by setting the properties of the project.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
i mean what is the simulator used for blackberry...i have downloaded the eclipse plugin for blackberry...is that enough?
Rasika L Deshmukh
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Ya that is enough
Rasika L Deshmukh
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Do you have any idea as how to run a midlet (J2me) in background after immediately instaling the application.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Background midlet on startup