We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getDeviceInfo() { // #ifdef APP-PLUS return new Promise((res, rej) => { // @ts-ignore plus.device?.getInfo({ success: function(e) { console.log("getDeviceInfo success: " + JSON.stringify(e)); res(e.imsi); }, fail: function(e) { console.log("getDeviceInfo failed: " + JSON.stringify(e)); rej(e); }, }); }); // #endif }
The text was updated successfully, but these errors were encountered:
打印输出的结果: getDeviceInfo success: {"imei":"","imsi":[""],"uuid":"ab14ccf2c87c2147"}
在manifest.json文件有添加权限: "<uses-permission android:name="android.permission.READ_PHONE_STATE"/>",
也没有弹出获取设备信息的授权提示框, targetSdkVersion是30
Sorry, something went wrong.
升级HBuilderX到最新版本,然后更换不同手机测试验证一下。
No branches or pull requests
getDeviceInfo() {
// #ifdef APP-PLUS
return new Promise((res, rej) => {
// @ts-ignore
plus.device?.getInfo({
success: function(e) {
console.log("getDeviceInfo success: " + JSON.stringify(e));
res(e.imsi);
},
fail: function(e) {
console.log("getDeviceInfo failed: " + JSON.stringify(e));
rej(e);
},
});
});
// #endif
}
The text was updated successfully, but these errors were encountered: