cancel
Showing results for 
Search instead for 
Did you mean: 

Unnecessary permission RECORD_AUDIO in Platform SDK for Unity

UmairEm
Level 3
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

20 REPLIES 20

Fulby
Level 7
I removed the microphone cs files (maybe a voip one too) and don't remember any problems regarding dependencies.

Truthveyor
Level 5
I'm using Oculus Platform SDK 1.20.0.  I had the same problem, and I removed the following files from the Oculus Platform SDK:

OculusPlatform\Scripts\IMicrophone.cs
OculusPlatform\Scripts\LivestreamingMicrophoneStatus.cs
OculusPlatform\Scripts\MicrophoneInput.cs
OculusPlatform\Scripts\MicrophoneInputNative.cs

Then I got errors from OculusPlatform\Scripts\CAPI.cs for missing LivestreamingMicrophoneStatus, so I commented out references to
LivestreamingMicrophoneStatus in CAPI.cs.  There are no more errors, everything worked fine, and the "record audio permission" went away.


AnneLanting
Level 2
Hi there,

Is this still the proper way to do this?

Greet, Anne.

m4lumm
Level 4
I am wondering the same thing. My Android app is asking for permission to record audio. I can remove the files no problem, however that is a messy solution. 

seatedmech
Level 3
I'm struggling with this at the moment. So in the three months since the last person posted in this thread, I take it there hasn't been any non-messy solution?

seatedmech
Level 3


I'm using Oculus Platform SDK 1.20.0.  I had the same problem, and I removed the following files from the Oculus Platform SDK:

OculusPlatform\Scripts\IMicrophone.cs
OculusPlatform\Scripts\LivestreamingMicrophoneStatus.cs
OculusPlatform\Scripts\MicrophoneInput.cs
OculusPlatform\Scripts\MicrophoneInputNative.cs

Then I got errors from OculusPlatform\Scripts\CAPI.cs for missing LivestreamingMicrophoneStatus, so I commented out references to
LivestreamingMicrophoneStatus in CAPI.cs.  There are no more errors, everything worked fine, and the "record audio permission" went away.




I did this as well, but my app is still requesting to use the microphone upon installation. 

Truthveyor
Level 5
seatedmech, notice I was using Oculus Platform SDK 1.20.0.  If you use a different version of Oculus Platform SDK, there may be other files requesting the use of the microphone.

I am guessing that you should look for any file with the word "microphone" in the file name and see if they were causing the problem.  In fact, I would suspect any audio related files in your project you didn't write yourself.

Nyro
Level 2




I'm using Oculus Platform SDK 1.20.0.  I had the same problem, and I removed the following files from the Oculus Platform SDK:

OculusPlatform\Scripts\IMicrophone.cs
OculusPlatform\Scripts\LivestreamingMicrophoneStatus.cs
OculusPlatform\Scripts\MicrophoneInput.cs
OculusPlatform\Scripts\MicrophoneInputNative.cs

Then I got errors from OculusPlatform\Scripts\CAPI.cs for missing LivestreamingMicrophoneStatus, so I commented out references to
LivestreamingMicrophoneStatus in CAPI.cs.  There are no more errors, everything worked fine, and the "record audio permission" went away.




I did this as well, but my app is still requesting to use the microphone upon installation. 


I am also having this problem.

cmdr2
Level 2
Along with the files mentioned earlier in this thread, I had to delete the 'Oculus/VoiceMod/Scripts/Helpers/OVRMicInput.cs' and 'Oculus/LipSync/Scripts/OVRLipSyncMicInput.cs' files as well for the RECORD_AUDIO permission to stop showing up.

I do wish there was a more robust way to manage this.