This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Sure, just like in J2SE - use Thread and Runnable.
Joined: Jul 27, 2005
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
Joined: Sep 13, 2003
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.