English 中文(简体)
B. 黑莓服务和自成一体的应用
原标题:Blackberry service and ui application running
  • 时间:2011-11-22 05:56:25
  •  标签:
  • blackberry

我的法典是:

 if ( args != null && args.length > 0 && args[0].equals("background1") ){
        // Keep this instance around for rendering
        // Notification dialogs.
         // Start a new app instance for GUI operations.     
        BackgroundApplication backApp=new BackgroundApplication();
        backApp.setupBackgroundApplication();   
       // backApp.enterEventDispatcher();
} 
    else {       
         theApp = new EntryPointForApplication();
         theApp.enterEventDispatcher();    

   }   

我想开办背景服务(自动启动)和专门应用。 当点击申请背景1时,它就开始工作。 背景服务没有运行。 我想管理背景服务。 如何处理这个问题? 我正在犯错误。

详细格式错误:java.util。 不能将射线排在一类

最佳回答

您可以通过在申请中使用候补切入点来实现这一目标。

在为原始申请设立项目后,创建了启动申请调查的备用切入点。

  • 在你的项目内,对BlackBerry_App_Descriptor.xml进行双重点击。

  • 在BlackBerry家屏幕上没有显示应用icon。

  • Click on the Submission tab.

  • Click the Add button.

  • 进入入口处,点击K。

  • Specify the application argument that would launch the application using this alternate entry point (for example: background1).

Make a class Wich will extend Application rather than UiApplication and check the main method like this ...

公共静态真空主(String[] arg){

     if(args.length>0&&"background1".equals(args[0])){
         //Start your Background Process here 


        }

     else{
        //Start your Gui application here 
     }
}
问题回答

暂无回答




相关问题
How does AlertListener work on Blackberry API 5.0?

Does the AlertListener interface works globally on all alerts on the blackberry device, or does it only work with alerts generated by your application? In other words, can I use this interface to ...

How to buffer audio in Blackberry?

I need to learn how to buffer audio stream from a remote server in Blackberry. There is a sample buffered playback app with Blackberry api but can you tell what url may I use to test the application?

Blackberry push notification implementation

How does one implement a push notification for a blackberry app? I heard that in order to do so I need to purchase a Blackberry Enterprise Server which costs me 1400 per year. Is this true? Where is ...

热门标签