views:

54

answers:

1

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?

+1  A: 

Set your MIDlet's Display's current Displayable to null.

QuickRecipesOnSymbianOS
Thanks, that worked perfectly. Silly me, reading tutorials rather than the J2ME Javadoc.
Paul Marshall