How do I stop displaying a J2ME MIDP application, just before destroying it?
Posted
by Paul Marshall
on Stack Overflow
See other posts from Stack Overflow
or by Paul Marshall
Published on 2010-05-12T02:23:27Z
Indexed on
2010/05/12
4:54 UTC
Read the original article
Hit count: 403
I have a J2ME application where the user has the option to dial a phone number from within the application. This should be the last thing the user does with the app, so it should stop displaying anything.
My current code:
public void callAndExit() {
// use a platform-specific request to dial
MyMidletThingummy.getInstance().platformRequest( "tel:" + number );
notifyDestroyed();
}
The call works just fine, uses the phone's native way of calling, etc. The problem is that, just after the call completes (whenever the user hangs up), my application displays for a split second before being destroyed. Is there something I can do so that I stop displaying the MIDlet (and, say, show the phone's home screen or whatever else it would rather display), then dial out?
© Stack Overflow or respective owner