- Home /
Check Camera Permissions for iOS and Android?
Hello,
My App is built around using the devices Camera. And is rendered completely useless if the user does not allow permissions for the App to use the device camera.
Is there an internal way for Unity to know if the permissions have been granted or not? I would like to check and prompt a dialog box / instructions if access is denied, and prevent the user from going further within the App.
I found this: https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html
But that is only for WebPlayer. I would like to know for both iOS and Android. Even if it requires me purchasing a plugin.
I know for android that the user is asked before launching the app, and if the user denies it, the app will not open. But for iOS the app will still run even if the user has denied access to the camera.
Thanks.
Did you find a solution to this? I also used Application.HasUserAuthorization to check whether or not the user has a camera permission, but unfortunetaley it always returns true on mobile devices and when calling WebcamTexture.Play() without permission the app crashes.
@oliver-jones Did you find any answer to the permission request on Android?