by 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.