cancel
Showing results for 
Search instead for 
Did you mean: 

Unnecessary permission RECORD_AUDIO in Platform SDK for Unity

UmairEm
Explorer
Recently my app got rejected with note:

Your app is asking for excessive user permissions or using user permissions inappropriately.


Here are all the permissions appearing in build info:


android.permission.READ_EXTERNAL_STORAGE

android.permission.INTERNET

android.permission.WAKE_LOCK

android.permission.ACCESS_NETWORK_STATE

android.permission.RECORD_AUDIO

android.permission.WRITE_EXTERNAL_STORAGE

android.permission.READ_EXTERNAL_STORAGE


At this point, RECORD_AUDIO permission is not required but its included because of MicrophoneInput.cs script under OculusPlatform/Scripts. If I remove this file and related files which use Unity's Microphone class and build the app, RECORD_AUDIO permission is gone. It makes sense to include this file in a project which actually uses Microphone at some point. But I am never gonna need it. Shall I remove this file and related files (IMicrophone.cs, MicrophoneInputNative.cs)? Are there any other files in Platform SDK which should be removed to avoid bugs due to code dependency?

Please advice me how to fix this

Thanks

25 REPLIES 25

DevClever1
Explorer
Thanks, i got it working by removing the scripts listed below and commenting out the errors (2 of them) inside of CAPI.cs.

OculusPlatform\Scripts\IMicrophone.cs

OculusPlatform\Scripts\LivestreamingMicrophoneStatus.cs

OculusPlatform\Scripts\MicrophoneInput.cs

OculusPlatform\Scripts\MicrophoneInputNative.cs

Oculus\LipSync\Scripts\OVRLipSyncMicInput.cs

Oculus\VoiceMod\Scripts\Helpers\OVRMicInput.cs


MikeSwanson
Protege
Thank you for the full list, @DevClever1. Like @cmdr2, I also wish that there was a more robust way to manage this, especially since app review will likely flag this as an issue.

@imperativity...is there any more official way to do this?

mouse_bear
Retired Support
@MikeSwanson Let me inquire to see if there's a better way of handling this.
If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
2. Please submit a ticket here through the "Contact Us" link (include what you've gathered in step 1).
3. Tag me @mouse_bear once you have done so!

MikeSwanson
Protege
Thanks! I upgraded to the latest Oculus Integration and the permission requests were back (of course), because the files were back.

remiludwig
Explorer
Hello, same problem here, is there a more proper way to handle this issue ? Like editting the androidmanifest so that it doesn't ask for this permission anymore ?

Timkor
Explorer
I added <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/> to Android Manifest to make sure the permission is not asked for.

Innovae
Honored Guest


I added <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/> to Android Manifest to make sure the permission is not asked for.


that didn't work for me, it still asks for the mic permission

Innovae
Honored Guest
As of version 1.32, you can fix this by commenting these scripts:
OVRMicInput.cs
OVRLipSyncMicInput.cs
These two scripts contain references to the Microphone class, which if called seems to trigger the mic permission request, so commenting the bits of code that reference it solves the issue.

gregbassett
Honored Guest
OK, I found the simple solution to this, I am using version 1.37.

In the OVR Avatar uncheck Can Own Microphone.

And now the permissions warning does not appear. :smiley:

FuzzyOnion
Protege
Hmm... what if you're not using OVR Avatar? Is there a current method to disabling mic permissions?