BlackBerry: Duplicate application menu items in UiApplication -


I have a Blackberry UiApplication, which registers some menu items in standard phone and contact applications, run me automatically on startup To configure my UI applications, menu items need to be registered on the phone startup before i.i.eping started, i.e., I

I can get it. App initialization code using ApplicationMenuItemRepository.

My problem is that whenever my UiApication is opened every time, my initial code goes back again, and I get duplicate menu items in the phone and contact app. ApplicationMenuItemRepository does not provide an API to check whether they are already registered. Using a steady boolean in my own code also does not help, possibly because different appellants are used for each app instance.

Am I using the wrong approach here? Should I have a separate application (register phone / contact menu item) and UIEpication (for my views)? This is very complicated for my needs.

  1. Click on the project node.

  2. Right click and select Properties.

  3. In the Properties window, select the App tab.

  4. Ensure that the following options are checked: Auto-run on startup and system modules (to register threads with system).

  5. Create another project in the same folder as the original project. Right click on the new project node and select Properties.

  6. Select the Application tab and select the optional CLDC Application Entry Point from the Project Type drop-down menu. As shown in the attached file, choose the name of the original project (for example: traffic reporter) from the optional entry point for the drop down menu. In addition, also specify the arguments that launch this application using this optional entry point (for example: GUI).

  7. Modify the main method of the original project as follows:

    Public static zero main (string [] args) {if (args! = Null & Amp; args.length> 0 and args [0] .equals ("gui")) // The app to start the app isApp.enterEventDispatcher (); } To launch other {// code background thread}}}

  8. Add your app icon file to this new "entry point" application and make it a ribbon icon.


Comments