In my android manifest but i still need to manually go to settings->apps>app>permissions and enable it there. This is ofcourse no good if i want to get people to use it.
(the camera gets used by a plugin called vuforia)
Thanks.
I’m in the same situation. I’m writing a cardboard app that is Unity the NatCam plugin from the asset store to try to read a QR code. Its not requesting the camera permission when the app launches. If I add permissions following your steps then it works. If you figure this out I’d be interested in what your solution was.
I’m on Unity 5.6 and was testing on a Samsung Galaxy S7.
Unity 2017.1f3 (OS X)
Minimum API level 21 (Lollipop)
Target API level 26 (auto, selected Oreo)
Any update on this?
NOTE: the permissions are automatically generated by Unity from using a WebcamTexture.
Manifest looks like this:
I just had the same issue here, when I upgrade my version of Unity from 5.5.3 to 5.6.0.
I used Vuforia and the gvr plugin from Google, my solution was to carefully remove all the residues of the old Google plugin ( gvr library permission ).
Hope it will help some of you,
Cheers.
same here since last week
Solved it by changing the targetSDK to 25. Instead of highest possible sdk. So it seems the problems occurs only with targetSDK 26/android 8.0
I’m still getting this issue and changing the target version to 25 doesn’t work for me as I’ve already selected that.
Is there any other fixes for this issue.
The issue is resolved.
The following solution works for me… i think it helps you too. just put this script on camera
using UnityEngine;
using UnityEngine.Android;
public class permissionscript : MonoBehaviour
GameObject dialog = null;
void Start()
#if
PLATFORM_ANDROID
if (!Permission.HasUserAuthorizedPermission(Permission.Camera))
Permission.RequestUserPermission(Permission.Camera);
#endif
// here is my device camera script
using UnityEngine;
using UnityEngine.UI;
public class simplecamera : MonoBehaviour
static WebCamTexture backCam;
void Start()
WebCamDevice[ ] devices = WebCamTexture.devices;
if(backCam == null)
backCam = new WebCamTexture();
GetComponent().texture = backCam;
backCam.Play();
samra2494:
The issue is resolved.
The following solution works for me… i think it helps you too. just put this script on camera
using UnityEngine;
using UnityEngine.Android;
public class permissionscript : MonoBehaviour
GameObject dialog = null;
void Start()
#if
PLATFORM_ANDROID
if (!Permission.HasUserAuthorizedPermission(Permission.Camera))
Permission.RequestUserPermission(Permission.Camera);
#endif
// here is my device camera script
using UnityEngine;
using UnityEngine.UI;
public class simplecamera : MonoBehaviour
static WebCamTexture backCam;
void Start()
WebCamDevice[ ] devices = WebCamTexture.devices;
if(backCam == null)
backCam = new WebCamTexture();
GetComponent().texture = backCam;
backCam.Play();
this method works but you have to close and open again the app so camera will work