-1

I am currently writing an android app with a REST Server Side.

Right now i trying to figure out how i am gonna do the "conversation" between the client and the server.

So what i started to think about is the unique id for each client in the server database. I am trying to avoid int/long/double value identifier and use string value.

In C# there's Guid object that generates a string which is being used as a identifier for clients.

That object doesn't exist in java so that's what i am trying to figure out.

In short , i am trying to decide how to configure the clients unique id in my database that would be used in the android client side and in the far future in iPhone client.

Thanks

Ido
  • 9
  • 5
  • 1
    The `Guid` class might not exist but of course GUIDs exist. GUIDs are not a C#, or even .Net construct. http://stackoverflow.com/questions/2982748/create-a-guid-in-java – Simon Dec 18 '14 at 18:21
  • Even if Oracle does not provide search engine of his own, you can use either one provide by the company created C# - http://www.bing.com/search?q=guid+java or Android - https://www.google.com/search?q=guid+java to check if "That object [GUID] doesn't exist in java" is indeed true or not. – Alexei Levenkov Dec 18 '14 at 18:50

1 Answers1

0

Maybe this is all you need:

java.util.UUID.randomUUID();
StefanTo
  • 971
  • 1
  • 10
  • 28