Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 16
Registered: ‎02-24-2012
My Device: 8520
My Carrier: Turkcell
Accepted Solution

Runtime Store ID

  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

Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Runtime Store ID



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.