https://www.codota.com/code/java/methods/android.telephony.TelephonyManager/getSubscriberId
String ts = Context.TELEPHONY_SERVICE;
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(ts);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();
TelephonyManager TM = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imeiNo = TM.getDeviceId();
String imsiNo = TM.getSubscriberId();
String simSerialNo = TM.getSimSerialNumber();
String androidId = System.getString(this.getContentResolver(),Settings.Secure.ANDROID_ID);
TelephonyManager tMgr = (TelephonyManager)
ShowMyLocation.this.getSystemService(Context.TELEPHONY_SERVICE);
String MyPhoneNumber = "0000000000";
try
{
MyPhoneNumber =tMgr.getLine1Number();
}
catch(NullPointerException ex)
{
}
if(MyPhoneNumber.equals("")){
MyPhoneNumber = tMgr.getSubscriberId();
TelephonyManager tMgr = (TelephonyManager)
ShowMyLocation.this.getSystemService(Context.TELEPHONY_SERVICE);
String MyPhoneNumber = "0000000000";
try
{
MyPhoneNumber =tMgr.getLine1Number();
}
catch(NullPointerException ex)
{
}
if(MyPhoneNumber.equals("")){
MyPhoneNumber = tMgr.getSubscriberId();
}
TelephonyManager telMan = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String phoneNumber = "00";
try {
phoneNumber =telMan.getLine1Number();
} catch(NullPointerException ex) {
ex.printStackTrace();
}
if(phoneNumber.equals("")){
phoneNumber = telMan.getSubscriberId();
}
private static String getActiveSubscriberId(Context context) {
final TelephonyManager tele = TelephonyManager.from(context);
final String actualSubscriberId = tele.getSubscriberId();
return SystemProperties.get(TEST_SUBSCRIBER_PROP, actualSubscriberId);
}
String serviceName = Context.TELEPHONY_SERVICE;
TelephonyManager m_telephonyManager = (TelephonyManager) getSystemService(serviceName);
String IMEI,IMSI;
IMEI = m_telephonyManager.getDeviceId();
IMSI = m_telephonyManager.getSubscriberId();
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();
String simno = mTelephonyMgr.getSimSerialNumber();
Log.v("", ""+imsi);
Log.v("", ""+imei);
Log.v("", ""+simno);
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();
String simno = mTelephonyMgr.getSimSerialNumber();
TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String subscriberID = tm.getSubscriberId();
NetworkStats networkStatsByApp = networkStatsManager.queryDetailsForUid(ConnectivityManager.TYPE_MOBILE, subscriberID, start, end, uid);
private static String getActiveSubscriberId(Context context) {
final TelephonyManager tele = TelephonyManager.from(context);
final String actualSubscriberId = tele.getSubscriberId();
return SystemProperties.get(TEST_SUBSCRIBER_PROP, actualSubscriberId);
}
TelephonyManager tMgr = (TelephonyManager)
ShowMyLocation.this.getSystemService(Context.TELEPHONY_SERVICE);
String MyPhoneNumber = "0000000000";
try
{
MyPhoneNumber =tMgr.getLine1Number();
}
catch(NullPointerException ex)
{
}
if(MyPhoneNumber.equals(""))
MyPhoneNumber = tMgr.getSubscriberId();
TelephonyManager TM = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imeiNo = TM.getDeviceId();
String imsiNo = TM.getSubscriberId();
String simSerialNo = TM.getSimSerialNumber();
String androidId = System.getString(this.getContentResolver(),Settings.Secure.ANDROID_ID);
TelephonyManager TM = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imeiNo = TM.getDeviceId();
String imsiNo = TM.getSubscriberId();
String simSerialNo = TM.getSimSerialNumber();
String androidId = System.getString(this.getContentResolver(),Settings.Secure.ANDROID_ID);
private static String getActiveSubscriberId(Context context) {
final TelephonyManager tele = TelephonyManager.from(context);
final String actualSubscriberId = tele.getSubscriberId();
return SystemProperties.get(TEST_SUBSCRIBER_PROP, actualSubscriberId);
}
String ts = Context.TELEPHONY_SERVICE;
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(ts);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();