- Home /
Permission.RequestUserPermission(Permission.Camera) not working on Android
II use the script below to ask for permission to get access to the camera on Android. But i does nothing when i deploy it to my S8. Do i need to add something else or what do i do wrong?
void Start()
{
if (Permission.HasUserAuthorizedPermission(Permission.Camera))
{
// The user authorized use of the microphone.
Debug.Log("The user has already permissions");
}
else
{
// We do not have permission to use the microphone.
// Ask for permission or proceed without the functionality enabled.
Debug.Log("Requesting permissions");
Permission.RequestUserPermission(Permission.Camera);
}
}
Ok, thanks. I implemented it but what if you want to ask more permissions at once? I repeated your code Permission.RequestUserPermission(Permission.Camera) but also with read external storage. But in that situation only at start of the app the first one is asked and not the second one. Ones the app is started for the second time that user is asked to permit access to the storage. Do you know how i can ask more permissions at once?
Your answer
Follow this Question
Related Questions
Check Camera Permissions for iOS and Android? 0 Answers
Could not open the camera with EmguCV 4.x on Android. 0 Answers
Check permissions on Android 2 Answers
android app with 3d camera 0 Answers
Google cardboard - Wrong cameras? 0 Answers