System - Get IMEI Number

//1

public String getIMEI(Activity activity) {
    android.telephony.TelephonyManager telephonyManager = (android.telephony.TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE);
    return telephonyManager.getDeviceId();
}

//2
public String getDeviceUniqueID(Activity activity){
    String device_unique_id = android.provider.Settings.Secure.getString(activity.getContentResolver(),
    android.provider.Settings.Secure.ANDROID_ID);
    return device_unique_id;
}

//3
public String getIMEI(Context context){
    android.telephony.TelephonyManager mngr = (android.telephony.TelephonyManager) context.getSystemService(context.TELEPHONY_SERVICE);
    String imei = mngr.getDeviceId();
    return imei;
}

//Need Permission READ_PHONE_STATE

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

How to enable download in webview in Sketchware apps?

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to integrate Admob Ads in Sketchware project using AIDE?

How to find and​ highlight a word in a text field in Sketchware?

Code for implementing Notifications in Sketchware

A Flash Light App in Sketchware

Create a Stopwatch App using Chronometer in Sketchware

Create app to save all passwords, protected using voice key