We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54c3808 commit 057ddf8Copy full SHA for 057ddf8
VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/utils/VenvyDeviceUtil.java
@@ -116,9 +116,15 @@ public static String getIMEI(Context context) {
116
* @return
117
*/
118
public static String getIMSI(Context context) {
119
- TelephonyManager tm = (TelephonyManager) context
120
- .getSystemService(Context.TELEPHONY_SERVICE);//
121
- return tm.getSubscriberId();
+ String imsi = "";
+ try {
+ TelephonyManager tm = (TelephonyManager) context
122
+ .getSystemService(Context.TELEPHONY_SERVICE);//
123
+ imsi = tm.getSubscriberId();
124
+ } catch (Exception e) {
125
+ e.printStackTrace();
126
+ }
127
+ return imsi;
128
}
129
130
/**
0 commit comments