Unique android app key

When developing an android application, I encountered a problem - it is necessary to track the uniqueness of the device ( 1 account == 1 device). All the methods found are bypassed via ROOT. Is there a way to create such a key that accurately identifies the device ?

Author: AirWays Flames, 2018-08-20

1 answers

In order to track the uniqueness of the device, you can get a special device ID, which is unique.

To do this, you need to write in the manifest:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

And in a certain place get the id:

TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
telephonyManager.getDeviceId();
 0
Author: Tony, 2018-08-21 09:04:26