Android Utililty Methods IMEI Get

List of utility methods to do IMEI Get

Description

The list of methods to do IMEI Get are organized into topic(s).

Method

StringgetIMEI(Context context)
get Imei
try {
    TelephonyManager mTelephonyMgr = (TelephonyManager) context
            .getSystemService(Context.TELEPHONY_SERVICE);
    String imei = mTelephonyMgr.getDeviceId();
    return imei;
} catch (Exception e) {
return null;
...
StringgetIMEI(Context context)
get IMEI
TelephonyManager tm = (TelephonyManager) context
        .getSystemService(Context.TELEPHONY_SERVICE);
if (tm == null) {
    return null;
return tm.getDeviceId();
StringgetIMEI(Context context)
get IMEI
return ((TelephonyManager) context
        .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();
StringgetIMEI(Context context)
Get Device IMEI
String imei = "";
TelephonyManager telephonyManager = (TelephonyManager) context
        .getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null) {
    imei = telephonyManager.getDeviceId();
    if (TextUtils.isEmpty(imei)) {
        imei = Secure.getString(context.getContentResolver(),
                Secure.ANDROID_ID);
...
voidshowInputMethodPicker(Context context)
show Input Method Picker
((InputMethodManager) context
        .getSystemService(Context.INPUT_METHOD_SERVICE))
        .showInputMethodPicker();
voidshowInputMethodSettingsPage(Context context)
show Input Method Settings Page
Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
context.startActivity(intent);