yasirkula / UnityAndroidRuntimePermissions

A native Unity plugin to handle runtime permissions on Android M+
MIT License
196 stars 29 forks source link

Works for camera and external storage write, but not microphone #8

Closed ksyao2002 closed 4 years ago

ksyao2002 commented 4 years ago

Attached is what I call:

AndroidRuntimePermissions.Permission result1 = AndroidRuntimePermissions.RequestPermission("android.permission.CAMERA"); AndroidRuntimePermissions.Permission result2 = AndroidRuntimePermissions.RequestPermission("android.permission.MICROPHONE"); AndroidRuntimePermissions.Permission result3 = AndroidRuntimePermissions.RequestPermission("android.permission.WRITE_EXTERNAL_STORAGE");

Here is my manifest:

\ \ \"

When I run it in build, it doesn't give error messages but it also never asks for the permission. When I print out result2 I get denied.

ksyao2002 commented 4 years ago

https://github.com/yasirkula/UnityAndroidRuntimePermissions/issues/4#issuecomment-612904376

Reported here too

ksyao2002 commented 4 years ago

Found the solution here: https://forum.unity.com/threads/open-source-androidruntimepermissions-manage-runtime-permissions-synchronously-on-android-m.528833/

"You need to add the following line inside ...:

To write data on external storage, you need the android.permission.WRITE_EXTERNAL_STORAGE permission."
yasirkula commented 4 years ago

Yes, seems like the microphone permission is named android.permission.RECORD_AUDIO 😄