views:

1450

answers:

4

Hi , i have a written a J2ME application which uses Bluetooth and search a file within the peer mobile and download it . I would like to make my application run in background , when ever i get a call , or message and later resume after few seconds , Has anybody worked on this please share your experience . Is there any way to run a Midlet in background.

+3  A: 

to set a j2me app to the background use the following in your midlet class:

          Display.getDisplay (this).setCurrent (null);

to get the screen back use the following:

          Display.getDisplay (this).setCurrent (myCanvas);

Where myCanvas is your canvas instantiation

R

p.s. You can still use a thread or timer to do things in the background while your midlet is hidden.

p.s.2: this does not work on all models. (Works on Nokia s60, SonyEricsson, but not on Nokia s40, Samsung and some others.

Toad
A: 

see Push Registry

rjlopes
A: 

hey Srinivas Iyer, i wonder if u already know how to run the bluetooth application and pause it when a sms is received. and then resume the bluetooth again based on a condition. i have been trying to run these 2 functions together. pls guide me along. thanks!

A: 

How does one find out what models that this will work on... is there an operating system list or something available to help in this...?? surely in this day and age I don't have to use the "suck it and see" approach to development...

adam