Help Center
Local Navigation
- Creating user interfaces
- Storing data
- Creating connections
- Managing applications
- Using custom messages and folders in the message list
- Applications for push content
- Localizing BlackBerry device applications
- Controlling access to APIs and application data
- Testing a BlackBerry device application
- Packaging and distributing a BlackBerry Java Application
- Glossary
- Provide feedback
- Legal notice
BlackBerry Manuals & Help
>
Documentation for Developers
>
Java Development Guides and API Reference
>
Development Guide - BlackBerry Java Development Environment - 4.7.0
Add an object in the runtime store
- Import the following classes:
- Invoke RuntimeStore.put(long, String) and provide as parameters a unique long ID and the runtime object to store.
- Create a try - catch block to manage the IllegalArgumentException that put() throws if a runtime object with the same ID exists.
RuntimeStore store = RuntimeStore.getRuntimeStore(); String msg = "Some shared text"; long ID = 0x60ac754bc0867248L; try { store.put( ID, msg ); } catch(IllegalArgumentException e) { }
Parent topic: Runtime storage