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.
2 parents 3330ced + c50a485 commit 45d2e31Copy full SHA for 45d2e31
VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/utils/VenvyDeviceUtil.java
@@ -116,10 +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();
122
- return "";
+ String imsi = "";
+ try {
+ TelephonyManager tm = (TelephonyManager) context
+ .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