@NeedsPermission(Manifest.permission.CAMERA)
@NeedsPermission(Manifest.permission.READ_EXTERNAL_STORAGE)
void myFunction() {
...
}
As you can see, I need 2 permissions allowed to call this function.
Please give your advice.
Thanks.
Our annotations accept arrays as their parameter, so you'd specify multiple permissions in the same annotation like so:
@NeedsPermission({Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE})
Thanks.
Thx!
Most helpful comment
Our annotations accept arrays as their parameter, so you'd specify multiple permissions in the same annotation like so: