Hoy to pause game when incoming call?

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

Hoy to pause game when incoming call?

Postby panchicore » Fri Jun 20, 2008 8:47 pm

When im playing my game and a call is incoming the game stay running.
i need to set pause state during the call.

Posts: 3
Joined: Fri Jun 20, 2008 7:35 pm

Re: Hoy to pause game when incoming call?

Postby DevelopmentTeam » Wed Jun 25, 2008 4:39 am

The Canvas method hideNotify() notifies you when the OS shows something over the midlet screen (like the system screen for an incoming phone call, battery recharging, etc.). The Canvas method showNotify() tells you when the MIDlet display should be visible again.

The Displayable method isShown() is also helpful in this respect sometimes, in a non-Canvas screen that has running threads or side-effects that should pause when the MIDlet is hidden by a system screen.

You cannot find if its an incoming call or the user has pressed the menu button. But you can find if the midlet is not on top of other applications.
User avatar
Site Admin
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Return to J2ME Games

Who is online

Users browsing this forum: No registered users and 2 guests