开发者

How do I stop displaying a J2ME MIDP application, just before destroying it?

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().pl开发者_如何学CatformRequest( "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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜