Search code examples
androidactivationimei

Unique identity for every Android device, Both gsm and non-gsm


I'm working on an android app project which needs activation for each device that runs this app. On Windows PC I know some solutions like using HDD's serial number as unique identifier for activation process.

But I need a way to be used in Android devices that does not support SIM card, so those devices does not have IMEI serial.

Better to say I need a unique factor on all Android devices, both support and does not support SIM card.

Regards Ata


Solution

  • you can try with this code also

    import android.provider.Settings.Secure;

    private String android_id = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);

    this will remain unchanged util device get wiped off which is a rare Case...