07-30-2012 08:41 PM - edited 07-30-2012 08:43 PM
I want to add access to my app from the menu that appears when you hit Menu while having a contact highlighted. In addition to access, I want to be albe to pass certain info from the contact entry to my app.
I understand I should be using ApplicationMenuItem but I'm unsure how to use it correctly.
First, how to I pass data from Contacts into my app when the menu item is selected?
Next, I want the menu item to appear whether or not my app is running. How do I achieve that? Should I require the app be always running? Is having my app always running even a realistic possibility?
For now, I've got the call to ApplicationMenuItem in my app's constructor, however it ends up being executed multiple times because my app can be exited and restarted. Every time the user exits and restarts my app, another menu item is added. Enter/exit 5 times and you've got 5 of the same menu item appearing.
How do I detect if I've already executed ApplicationMenuItem and prevent it from being executed more than once?
Additionally, reading the dev forum here, I've seen advice to use ApplicationMenuItem with multiple entry points. If my app is entered via the menu item I should detect that in main() and, if the app isn't already active, execute a special constructor that performs enough set up so my app can perform its function. How do I set that up?
FWIW, I'm using Eclipse and the Blackberry plug in and would like this to operate on as many versions of the OS as possible.
07-31-2012 02:38 AM