-1

How can I identify a device uniquely?

I have gone through some links and ans here but confused as most of the answer were written a long time ago and depreciated. what is the best way currently recommended by google?

Robin Halder
  • 253
  • 2
  • 14

2 Answers2

0

If i were you i would definitely go for the Device Id,Most safe and secure commonly used in today's Business Logics, U can retreive it by:

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(),
                                                    Secure.ANDROID_ID); 
Avinash Roy
  • 953
  • 1
  • 8
  • 25
0

You can use the hardware is of device, it's always unique for every device.

How to retrieve device hardware id :

import android.provider.Settings.Secure;

    Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);
Pro Mode
  • 1,453
  • 17
  • 30