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 String getImei(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = telephonyManager.getDeviceId(); return imei;/* ww w.j a v a 2s. co m*/ }
From source file:Main.java
public static String getIMEI(Context context) { TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = mTelephonyMgr.getDeviceId(); return imei;//from www .j av a 2 s. c om }
From source file:Main.java
public static String getPhoneNumber(Context context) { TelephonyManager phoneMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return phoneMgr.getLine1Number(); }
From source file:Main.java
public static String getIMEI(Context context) { TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return mTelephonyMgr.getDeviceId(); }
From source file:Main.java
public static String getNetworkOperator(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return tm.getNetworkOperator(); }
From source file:Main.java
public static String getImsi(Context context) { TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return mTelephonyMgr.getSubscriberId(); }
From source file:Main.java
public static String getIMEI(Context context) { TelephonyManager telecomManage = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return telecomManage.getDeviceId(); }
From source file:Main.java
public static String getDevice_id(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); if (tm != null) { return tm.getDeviceId(); }/*from w w w . j a v a2s. c o m*/ return ""; }
From source file:Main.java
public static String getSimSerialNumber(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return tm.getSimSerialNumber(); }
From source file:Main.java
public static String getIMEI(Context context) { TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = manager.getDeviceId(); if (imei == null) imei = ""; return imei;//from w w w . jav a2s.c o m }