如何最小化J2ME应用程序? [英] How Do I Minimize a J2ME App?

查看:121
本文介绍了如何最小化J2ME应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要我的J2ME应用程序在后台运行,仍然允许用户使用他的手机没有问题。
应用仍然需要在后台处理一些事件。

I need my J2ME app to run in the background and still allow the user to use his mobile without problem. the app still needs to process some events in the background.

如果他愿意,我还想允许用户停止该应用。

I would also like to allow the user to stop the app if he wants to.

如何实现这一目标?

推荐答案

设备能够运行后台应用取决于它的多任务处理能力。因此,与低成本设备相比,更昂贵的PDA类型设备更可能支持后台执行。对于后台: -

A device's ability to run an application in the background depends on its ability to multitask. Therefore, more expensive, PDA-type devices are more likely to support background execution than lower-cost devices. For in background :-

 private Display display = Display.getDisplay(this);
 private Displayable previousDisplayable;

 public void toBack() {
 previousDisplayable = display.getCurrent();
 display.setCurrent(null);
 }

前景: -

public void toFront() {
display.setCurrent(previousDisplayable);
}

但请注意,每台设备都不支持该功能。(适用于诺基亚s60 ,SonyEricsson,但不是诺基亚s40,三星和其他一些人。)

But Be aware that every device not supports that features.(Works on Nokia s60, SonyEricsson, but not on Nokia s40, Samsung and some others).

这篇关于如何最小化J2ME应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆