How to get GUID in android?

Solution 1:

Yes you should use UUID like the following code:

String  uniqueID = UUID.randomUUID().toString(); 

Solution 2:

You can use the java.util.UUID class.

Solution 3:

We can use

String uniqueID = UUID.randomUUID().toString();

An Instance ID or a GUID is scoped to the app that creates it, which prevents it from being used to track users across apps.For more information and significance please refer this link here

Solution 4:

You will get UUID in Android,

UUID uuid = UUID.randomUUID();
String uuidInString = uuid.toString();