我想通过编程获得手机序列号,我的应用程序的注册配置,以及我的应用程序已经安装在他们身上的用户和手机的数量。
我能拿到那个吗?
我能得到我的应用程序已经安装在他们的手机型号吗?
发布于 2013-02-02 18:50:11
请参考此https://stackoverflow.com/a/1972404/951045
TelephonyManager mngr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
mngr.getDeviceId();
向AndroidManifest.xml
添加READ_PHONE_STATE
权限
发布于 2013-12-29 23:30:59
public String getIMEI(Context context){
TelephonyManager mngr = (TelephonyManager) context.getSystemService(context.TELEPHONY_SERVICE);
String imei = mngr.getDeviceId();
return imei;
}
发布于 2013-02-02 18:39:17
以下是代码:
telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
deviceId = telephonyManager.getDeviceId();
Log.d(TAG, "getDeviceId() " + deviceId);
phoneType = telephonyManager.getPhoneType();
Log.d(TAG, "getPhoneType () " + phoneType);
https://stackoverflow.com/questions/14660938
复制相似问题