我做了以下,但它并不总是工作。它的作品,如果我手动启动应用程序,然后关闭设备,并打开设备我的应用程序启动。但在关闭设备之前,如果我切换到另一个应用程序,然后打开设备,“我的应用程序没有启动”。如何在设备上启动黑莓应用程序打开/打开
import net.rim.device.api.system.ApplicationDescriptor;
import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.ui.UiApplication;
public class MyApp extends UiApplication
{
public static void main(String args[]) {
if (args.length == 0)
{
ApplicationDescriptor current = ApplicationDescriptor.currentApplicationDescriptor();
current.setPowerOnBehavior(ApplicationDescriptor.POWER_ON);
ApplicationManager manager = ApplicationManager.getApplicationManager();
manager.scheduleApplication(current, System.currentTimeMillis()
+ 2000, true);
}
System.out.println("restarted !");
MyApp app = new MyApp();
app.enterEventDispatcher();
}
public MyApp()
{
pushScreen(new MyScreen());
}
}
Please help..........it's important...and thanks a lot.
是的,我同意你,但在Android我们可以做到这一点。应该有任何方式来做到这一点。 – Amrit 2012-03-26 12:54:17
要做什么? – 2012-03-27 08:06:00