如何在销毁 J2ME MIDP 应用程序之前停止显示它?
我有一个 J2ME 应用程序,用户可以选择从应用程序内拨打电话号码。这应该是用户使用应用程序执行的最后一件事,因此它应该停止显示任何内容。
我当前的代码:
public void callAndExit() {
// use a platform-specific request to dial
MyMidletThingummy.getInstance().platformRequest( "tel:" + number );
notifyDestroyed();
}
呼叫工作正常,使用手机的本机呼叫方式等。问题是,在呼叫完成后(每当用户挂断电话时),我的应用程序会在被销毁之前显示一瞬间。我可以采取什么措施来停止显示 MIDlet(例如,显示手机的主屏幕或它希望显示的其他任何内容),然后拨出?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 MIDlet 的 Display 的当前 Displayable 设置为 null。
Set your MIDlet's Display's current Displayable to null.