Retrieve persistent data
- Import the required classes and interfaces.
import net.rim.device.api.system.PersistentObject;
import net.rim.device.api.ui.component.Dialog;
-
Invoke getContents() on a PersistentObject.
- To convert to your desired format, perform an explicit cast on the object that PersistentObject.getContents() returns.
synchronized(store) {
String[] currentinfo = (String[])store.getContents();
if(currentinfo == null) {
Dialog.alert(_resources.getString(APP_ERROR));
}
else {
currentusernamefield.setText(currentinfo[0]);
currentpasswordfield.setText(currentinfo[1]);
}
}
Was this information helpful? Send us your comments.