public static String imsi() { String imsi = null; try { imsi = ((TelephonyManager) ContextManager.systemService(Context.TELEPHONY_SERVICE)) // .getSubscriberId(); } catch (Exception e) { } return TextHelper.ensureNotNull(imsi); }
public static String wifiMac() { String mac = null; try { mac = ((WifiManager) ContextManager.systemService(Context.WIFI_SERVICE)) // .getConnectionInfo() .getMacAddress(); } catch (Exception e) { } return TextHelper.ensureNotNull(mac); }
/** * A 64-bit number (as a hex string) that is randomly generated on the device's first boot and * should remain constant for the lifetime of the device. (The value may change if a factory reset * is performed on the device.) */ public static String androidId() { return Secure.getString(ContextManager.contentResolver(), Secure.ANDROID_ID); }