Retrieve a registered runtime object

  1. Import the following classes:
    • net.rim.device.api.system.RuntimeStore
    • net.rim.device.api.system.ControlledAccessException
  2. Invoke RuntimeStore.get() and provide as a parameter the runtime object ID.
  3. Create a try - catch block to manage the ControlledAccessException that get() throws if the BlackBerry® Java® Application does not have read access to the specified runtime object.
    RuntimeStore store = RuntimeStore.getRuntimeStore();
    try {
    Object obj = store.get(0x60ac754bc0867248L);
    } catch(ControlledAccessException e) {
    }

Index


Was this information helpful? Send us your comments.