Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Background midlet on startup

 
Abhijit Chandekar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, just like in J2SE - use Thread and Runnable.
 
Abhijit Chandekar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rasika L Deshmukh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean what is the simulator used for blackberry...i have downloaded the eclipse plugin for blackberry...is that enough?
 
Rasika L Deshmukh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya that is enough
 
Rasika L Deshmukh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any idea as how to run a midlet (J2me) in background after immediately instaling the application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic