Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

IMEI DEVISE ANDROID JAVA

public static String getDeviceId(Context context) {

 String deviceId;

    if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
        deviceId = Settings.Secure.getString(
                context.getContentResolver(),
                Settings.Secure.ANDROID_ID);
    } else {
        final TelephonyManager mTelephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        if (mTelephony.getDeviceId() != null) {
            deviceId = mTelephony.getDeviceId();
        } else {
            deviceId = Settings.Secure.getString(
                    context.getContentResolver(),
                    Settings.Secure.ANDROID_ID);
        }
    }

    return deviceId;
}
Comment

PREVIOUS NEXT
Code Example
Java :: current currency rates api 
Java :: java initialize dynamic array of boolean 
Java :: can you automate mouseclicks with java 
Java :: Display a Text Five Times 
Java :: how to make a typewriter effect in jaca 
Java :: initialize set of strings java 
Java :: how to create an indefilite loop in java 
Java :: is type java 
Java :: action performed java swing code 
Java :: rstudio boxplot coloring 
Java :: stackoverflow java enum with constructor 
Java :: labelled for loop in java 
Java :: string join in java 
Java :: print current user roles in java 
Java :: java ultimo dia del mes 
Java :: java tostring methode überschreiben 
Java :: javafx stage always on top 
Java :: set bean properties 
Java :: android code get arrayList index 
Java :: Copying Arrays Using Assignment Operator Java 
Java :: Java Single-line Comment 
Java :: java @documented 
Java :: how to romve a element from arraylist in java 
Java :: Custom Layout to listview 
Java :: Java Access Members of a Class 
Java :: class BuildConfig is public, should be declared in a file named BuildConfig.java 
Java :: focus button java swing 
Java :: what is resource bundle class in java 
Java :: Reverse Order Output for Java Do-While Loop 
Java :: Java labeled break Statement 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =