9
1: Adding menu items to BlackBerry Java Applications
Register a menu item
Task
Steps
Retrieve the BlackBerry® MDS Java
Application menu item repository.
>
Invoke
ApplicationMenuItemRepository.getInstance().
ApplicationMenuItemRepository repository =
ApplicationMenuItemRepository.getInstance();
Create your BlackBerry Java
Application menu item.
>
Invoke the constructor.
ContactsDemoMenuItem contactsDemoMenuItem = new ContactsDemoMenuItem();
Add the menu item to the repository. >
Invoke
ApplicationMenuItemRepository.addMenuItem().
repository.addMenuItem(ApplicationMenuItemRepository.MENUITEM_ADDRESSCARD
_VIEW, contactsDemoMenuItem);
Add the menu item to BlackBerry®
Maps.
>
Invoke
ApplicationMenuItemRepository.addMenuItem()
using the
MENUITEM_MAPS
field.
repository.addMenuItem(ApplicationMenuItemRepository.MENUITEM_MAPS,
contactsDemoMenuItem);
Summary of Contents for JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE
Page 4: ......
Page 7: ......
Page 10: ...10 BlackBerry Device Applications Integration Guide...
Page 12: ...12 BlackBerry Device Applications Integration Guide...
Page 50: ...50 BlackBerry Device Applications Integration Guide...
Page 56: ...56 BlackBerry Device Applications Integration Guide...
Page 65: ......
Page 66: ...2008 Research In Motion Limited Published in Canada...