Generation of ID of RuntimeStore. Why and how?

Hello

I develop for API 5.0 +, java.

I'm confused about RuntimeStore ID. I read that
-It must be unique and can be generated with eclipse, right-click rights, etc...
-Can I use any number I love

I tried my request on simulators and it worked fine, but when I tried it on a real device and then the returned RuntimeStore and the object that was not put there by me (he has returned an object of NoMoreTransportsException.), so I thought I used a non-unique ID, no doubt. I changed it and now it works OK.

My questions
1. the ID must be unique in the application or the system?
-If a single for the app, so why not use just a series simple as 1,2,3,...
-If only I had the habit of the app, then why is there an object in the RuntimeStore for this ID? (as I mentioned above)
-If for the system, then how can be sure, that the generated ID is really unique? (Long data type cannot hold a real GUID)

2 if I want to put a string to RuntimeStore, how to generate a unique ID? Someone said I should use the fully qualified name of the class, so the Eclipse generated for java.lang.String hash is 0xd4e2de8aa7759716L, right?

-In this case if the id should be unique system, what happens if another application is already using this ID, because it was generated in the same way (java.lang.String-> 0xd4e2...)

Thank you!
Zsolt

1 Yes
2. This is not systemic, used in the world, so no need for the G in front of UID.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for