点击拍照操作,如果没有允许使用摄像头,照样会打开摄像头,但是黑屏。有么有点击拍照操作时就有提示啊,官方有人能回复下吗,急急急!!! 网上给的检测拍照Native,js代码在11.2.6 不通过
- 发布:2018-03-02 10:18
- 更新:2018-03-02 10:40
- 阅读:1241
9***@qq.com (作者)
function getImage() {
在这就检测是否允许摄像头,下面的方法有问题
// if(IoA=="1"){
// var AVCaptureDevice = plus.ios.importClass("AVCaptureDevice");
// var Status = AVCaptureDevice.authorizationStatusForMediaType("vide");
// if (3 != Status) {
// mui.toast('请在设置中允许使用相机');
// return false;
// }
// }
var cmr = plus.camera.getCamera();
alert(cmr.supportedImageFormats);
cmr.captureImage(function(p) {
plus.io.resolveLocalFileSystemURL(p, function(entry) {
if(IoA=="1")
{
fl="1";
}
else{
fl="1";
}
var path = entry.toLocalURL();
ToZip(path);
},
function(e) {
console.log(e);
});
},
function(e) {
console.log(e);
}, {
filename: "_doc/camera/",
});
}
苹果拒绝
We discovered one or more bugs in your app when reviewed on iPhone running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.
Specifically, your tapping on “拍照,” your app requests users to access Settings to allow camera permission; however, your app does not request access to use’s camera feature.
Please see attached screenshots for details.
9***@qq.com (作者)
function getImage() {
在这就检测是否允许摄像头,下面的方法有问题
// if(IoA=="1"){
// var AVCaptureDevice = plus.ios.importClass("AVCaptureDevice");
// var Status = AVCaptureDevice.authorizationStatusForMediaType("vide");
// if (3 != Status) {
// mui.toast('请在设置中允许使用相机');
// return false;
// }
// }
var cmr = plus.camera.getCamera();
alert(cmr.supportedImageFormats);
cmr.captureImage(function(p) {
plus.io.resolveLocalFileSystemURL(p, function(entry) {
if(IoA=="1")
{
fl="1";
}
else{
fl="1";
}
var path = entry.toLocalURL();
ToZip(path);
},
function(e) {
console.log(e);
});
},
function(e) {
console.log(e);
}, {
filename: "_doc/camera/",
});
}
苹果拒绝
We discovered one or more bugs in your app when reviewed on iPhone running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.
Specifically, your tapping on “拍照,” your app requests users to access Settings to allow camera permission; however, your app does not request access to use’s camera feature.
Please see attached screenshots for details.
2018-03-02 10:45