/*PermissionsAndroid用法问题。我这样子用,为啥报错?卧槽,文档里面明明有这个方法的
,我想同时申请2个权限,一个是录音,一个是存储权限,文档里面明明有requestMultiple这个方法,为啥报错? /
/ I want request 2 permissions at the same time,I write like this , why has this problem? */
//Here is my Code =>
{
let array = [];
array.push(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO);
array.push(PermissionsAndroid.WRITE_EXTERNAL_STORAGE);
let object = PermissionsAndroid.requestMultiple(array);
console.debug("object: " + object);
}
//Here is the red screen =>
permission is null
checkSelfPermission
ContextImpl.java:1603
checkSelfPermission
ContextWrapper.java:690
requestMultiplePermissions
PermissionsModule.java:155
invoke
Method.java
invoke
BaseJavaModule.java:368
invoke
JavaModuleWrapper.java:138
run
NativeRunnable.java
handleCallback
Handler.java:751
dispatchMessage
Handler.java:95
dispatchMessage
MessageQueueThreadHandler.java:31
loop
Looper.java:154
run
MessageQueueThreadImpl.java:208
run
Thread.java:761
use this
let object = PermissionsAndroid.requestMultiplePermissions(array)
Hey, thanks for reporting this issue!
It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.
I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!
You miss PERMISSION in the middle of PermissionsAndroid.WRITE_EXTERNAL_STORAGE, it should look like PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE
Most helpful comment
You miss PERMISSION in the middle of PermissionsAndroid.WRITE_EXTERNAL_STORAGE, it should look like PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE