How to setup alternate entrypoint in Blackberry Application.There will be 2 application
- UI Application
- Background Application: will run on autostart.
There is a blackberry knowledge center article about this, which I tried, and coded as follows. But on clicking the application icon, there is no response.
class EntryPointForApplication extends UiApplication {
public EntryPointForApplication() {
GUIApplication scr = new GUIApplication();
pushScreen(scr);
}
public static void main(String[] args) {
if ( args != null && args.length > 0 && args[0].equals("background1") ){
// Keep this instance around for rendering
// Notification dialogs.
BackgroundApplication backApp=new BackgroundApplication();
backApp.enterEventDispatcher();
backApp.setupBackgroundApplication();
} else {
// Start a new app instance for GUI operations.
EntryPointForApplication application = new EntryPointForApplication();
application.enterEventDispatcher();
}
}
}
Class UI Application
class GUIApplication extends MainScreen {
public GUIApplication(){
add(new LabelField("Hello World"));
}
}
Background Application
class BackgroundApplication extends Application {
public BackgroundApplication() {
// TODO Auto-generated constructor stub
}
public void setupBackgroundApplication(){
}
}
I configured Blackberry_App_Discriptor.xml according to this (edit) bad-link
Can any body help,where am going wrong.