我想创建一个后台应用程序,它将在系统启动时运行。当我手动(从功能区)运行它时,会出现屏幕,但是当我将它作为启动应用程序(描述符中的启动时自动运行选项)后运行应用程序时,屏幕上不会显示任何内容。我正在尝试下面的代码;黑莓应用程序:屏幕不显示在自动运行模式
public class AppClass extends UiApplication {
public static void main(String[] args) {
AppClass theApp = new AppClass();
theApp.enterEventDispatcher();
}
public AppClass() {
pushScreen(new AppScreen());
}
}
而这是屏幕类;
public final class AppScreen extends MainScreen {
private LabelField label;
public AppScreen() {
setTitle("AppTitle");
label = new LabelField();
label.setText("Ready.");
add(label);
}
}
我期待它的UI应用程序,所以它的屏幕应该是可见无论是在启动时自动运行或者手动运行。如果我需要做一些事情使其按预期工作,请指导我,我是BlackBerry开发的新手。 我在以下环境中开发;
- 黑莓JDE Eclipse插件1.5.0
- 的BlackBerry OS 4.5
谢谢先生。让我试试看。 – Mudassir