You Are Here:

Community: Developer Discussion Boards

#1 Old Running an application in the background. - 2003-05-16, 16:58

Join Date: May 2003
Posts: 1
roger_madsen
Offline
Registered User
Is it possible to run a midlet in the background?

Ive tried to call the notifyPaused() function to hide the midlet. This works on SUNs emulator but not on Nokias. But on the SUN emulator i cant get the application active again.

I would like to have my midlet in the background, and when something happends it will go in to active state again and popup an alert...

Is this possible? If so, is it possible to run multiple java applications on the phone?

/Roger
Reply With Quote

#2 Old 2003-07-21, 09:45

Join Date: Apr 2003
Posts: 184
zivgr
Offline
Regular Contributor
I am facing the same problem. Have you found a solution to this issue?

Thanks
Reply With Quote

#3 Old 2003-07-21, 11:17

Join Date: Jun 2003
Posts: 414
Location: Hungary
kisember
Offline
just a baker
Calling notifyPaused() mean: ask JVM to pause application via calling pauseApp().
If you want to run in background call display.setCurrent(null);

MIDP API - Display.setCurrent(Displayable nextDisplayable):

"The application may pass null as the argument to setCurrent(). This does not have the effect of setting the current Displayable to null; instead, the current Displayable remains unchanged. However, the application management software may interpret this call as a hint from the application that it is requesting to be placed into the background. Similarly, if the application is in the background, passing a non-null reference to setCurrent() may be interpreted by the application management software as a hint that the application is requesting to be brought to the foreground. "
Reply With Quote

#4 Old 2003-07-21, 11:24

Join Date: Apr 2003
Posts: 184
zivgr
Offline
Regular Contributor
Thanks.
However I have tried several NOKIA phones and they don't support this.
As you probably noticed it is a "MAY" and not a must and thus the vendors have the choice not to implement it.

Concerning notifyPaused(), I was thinking that since it should cause eventually the MIDlet to enter the pause state then when it happens the MIDlet will also go to the background.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia