Commit b947eaa4 by cuiliang.shi

MEID获取不到 用IMEI1 代替

1 parent 3d6a465e
......@@ -14,8 +14,8 @@ android {
applicationId "com.toscl.location.hengfeng"
minSdkVersion 23
targetSdkVersion 28
versionCode 11
versionName "0.7.5"
versionCode 12
versionName "0.7.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......
......@@ -629,6 +629,17 @@ public class PhoneUtils {
} catch (Exception e) {
e.printStackTrace();
}
if (TextUtils.isEmpty(meid)){
try{
Method method = telephonyManager.getClass().getMethod("getDeviceId", int.class);
if (TextUtils.isEmpty(meid)){
meid = (String) method.invoke(telephonyManager, 0);
}
Log.e(TAG, "meid end:" + meid);
}catch (Exception e){
}
}
return meid;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!