Retrieve An Unregistered Runtime Object - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVELOPMENT GUIDE Manual

Version: 4.7.0
Hide thumbs Also See for JAVA DEVELOPMENT ENVIRONMENT - - DEVELOPMENT GUIDE:
Table of Contents

Advertisement

Development Guide
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) {
}

Retrieve an unregistered runtime object

1.
Import the following classes:
• net.rim.device.api.system.RuntimeStore
• net.rim.device.api.system.ControlledAccessException
• java.lang.RuntimeException
2.
Invoke RuntimeStore.waitFor() to wait for registration of a runtime object to complete.
3.
Create code to handle exceptions.
RuntimeStore store = RuntimeStore.getRuntimeStore();
try {
Object obj = store.waitFor(0x60ac754bc0867248L);
} catch(ControlledAccessException e) {
} catch(RuntimeException e) {
}
Runtime storage
53

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment

Table of Contents