问题
In my app, I have used one alternate entry point to check time. If smartphone go to the time I set here, it will push one screen (ex Screen1) in my main app.
public static void main(String[] args)
{
MyApp theApp = new MyApp();
if ( args != null && args.length > 0 && args[0].equals("autorun") ) {
theApp.enterEventDispatcher();
} else {
theApp.pushScreen(new MyScreen());
theApp.enterEventDispatcher();
}
}
in Screen1 have some button (ex New button), generally when I run my app and click "New button" , it will push Screen2. but in this case, no thing occur. How can I solve this problem ?
回答1:
Using the BlackBerry® Java® Plug-in for Eclipse®
After creating the project for the original application,
create an alternate entry point to launch the application UI.
Double click on BlackBerry_App_Descriptor.xml within your project.
- Check off System Module and Do not display the application icon on the BlackBerry home screen.
- Click on the Alternate Entry Point tab.
- Click the Add... button.
- Enter a title for the entry point and click OK.
- Specify the application argument that would launch the application using this alternate entry point (for example:
gui
). - Proceed to the Common Steps section.
for Moreinfo:
http://supportforums.blackberry.com/t5/Java-Development/Set-up-an-alternate-entry-point-for-an-application/ta-p/444847
来源:https://stackoverflow.com/questions/9265919/how-to-access-main-application-from-alternate-entry-point-on-blackberry