赞
踩
在uniApp中进行蓝牙连接,需要获取以下权限:
获取权限步骤:
"permissions": {
"bluetooth": {
"description": "用于蓝牙连接"
},
"location": {
"description": "用于定位"
},
"storage": {
"description": "用于存储"
}
}
uni.requestBluetoothAdapter({
success: function(res) {
console.log('蓝牙权限请求成功');
},
fail: function(res) {
console.log('蓝牙权限请求失败');
}
});
uni.getLocation({
success: function(res) {
console.log('定位权限请求成功');
},
fail: function(res) {
console.log('定位权限请求失败');
}
});
uni.saveFile({
success: function(res) {
console.log('存储权限请求成功');
},
fail: function(res) {
console.log('存储权限请求失败');
}
});
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。