List of usage examples for android.content Context TELEPHONY_SERVICE
String TELEPHONY_SERVICE
To view the source code for android.content Context TELEPHONY_SERVICE.
Click Source Link
From source file:Main.java
public static final String getIMEI(final Context context) { TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return manager.getDeviceId(); }
From source file:Main.java
public static String getDeviceId(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String id = telephonyManager.getDeviceId(); return id == null ? "unknown device id" : id; }
From source file:Main.java
public static String getIMSI(Context context) { String imsi = null;//from w ww.j a v a2 s . c om imsi = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getSubscriberId(); return imsi; }
From source file:Main.java
public static String getIMEI(Context context) { String imei = null;//from w w w . j a v a2 s .co m imei = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); return imei; }
From source file:Main.java
public static String getMyPhoneImei(Activity _act) { return ((TelephonyManager) _act.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); }
From source file:Main.java
public static String getIMEICode(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return telephonyManager.getDeviceId(); }
From source file:Main.java
public static String getDeviceCode(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return telephonyManager.getDeviceId(); }
From source file:Main.java
public static String getIMEI(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = telephonyManager.getDeviceId(); return imei;// w ww .j a va 2 s .c o m }
From source file:Main.java
public static String getUserDeviceID(Context context) { TelephonyManager telephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String deviceId = telephony.getDeviceId(); return deviceId; }
From source file:Main.java
public static boolean isPhone(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return true;/*from ww w . ja va2 s . com*/ }