sanukin39 / UniAndroidPermission

Android Runtime Permission for Unity
MIT License
136 stars 30 forks source link

Its posible to ask for CAMERA permission? #7

Open Subuitai opened 7 years ago

Subuitai commented 7 years ago

Hi! I dont know much about programing, but I did an app in unity by my own. But I have an issiu with CAMERA permission in Android 6. My app doesnt ask for them (unity 5.0), so the camera never works.

I was wandering If I can use this plug in to ask for it, changin .WRITE_EXTERNAL_STORAGE for .CAMERA in the script

thanks for advance!

sanukin39 commented 7 years ago

Hi Subuitai,

It's possible to ask Camera permission. You can ask the permission adding code below to your script.

UniAndroidPermission.IsPermitted (AndroidPermission.CAMERA);

And adding code below to your AndroidManifest.xml

<uses-permission android:name="android.permission.CAMERA" /> 

Thanks,