05-17-2012 05:39 AM
long MY_DATA_ID = 0x33abf322367f9018L; Hashtable myHashtable = new Hashtable(); // Get the code signing key associated with "ACME" CodeSignKey codeSigningKey = CodeSigningKey.get( moduleHandle, "ACME" ); // Store myHashtable in the RuntimeStore but protect // it with the "ACME" code signing key RuntimeStore.put( MY_DATA_ID, new ControlledAccess( myHashtable, codeSigningKey ) );
The above example is taken from http://www.blackberry.com/developers/docs/4.7.0api
I would like to know how can i decide on the value to assing to MY_DATA_ID, and why that id is needed.
Thanks in advance
Solved! Go to Solution.
05-17-2012 06:25 AM
You need a unique id to store any object in Runtime... and when you try to get the object from runtime you need the same id to be passed in the get method.
I always create the id from the full package name...
In eclipse you can achive this by selecting the string and right click and select convert String to Long.