Summary:
i want to use android camera from my Android Phone for the Raw Image in the Unity. I follow the instructions at https://www.youtube.com/watch?v=c6NXkZWXHnc for the simple apps and working.
but when i use "Virtual Reality Supported" on my builder and run it on my phone, the camera didn't work.
normal apps would ask for permission for this, but when i use vr mode, there is no any pop up messages. What should I do?
Found using:
Steps to reproduce the issue:
Workarounds:
Additional comments:
Check the PermissionsDemo scene, that might be what you're looking for
@vinhui hello bro, thank you for your suggestion
i try to run the scene on my devices, but when i trigger the "Request Permission Demo" button, the apps was forced close
i also change the permissionNames array to "android.permission.CAMERA" but the apps still crash. i also change the build API target to 5.1 (Lollipop)
any solution for it?
hello guys, i finally had a successful solution, just adding a few line
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false"/>
<!-- camera permission -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
i hope it would help you all
Happy to hear you found a solution.