How do I stop serving a J2ME MIDP application before killing it?

I have a J2ME application where the user is able to dial a phone number from the application. This should be the last thing the user does with the app, so it should stop showing anything.

My current code:

public void callAndExit() {
  // use a platform-specific request to dial
  MyMidletThingummy.getInstance().platformRequest( "tel:" + number );

  notifyDestroyed();
}

      

The call works very well, uses its own way of calling the phone, etc. The problem is that right after the call ends (whenever the user hangs), my app is rendered a split second before it is destroyed. Is there something I can do to stop displaying the MIDlet (and, say, showing the phone's home screen or whatever it would rather display) and then dial the number?

+2


a source to share


1 answer


Set the current state of the Display midlet to zero.



+2


a source







All Articles