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
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
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.
Is this still the proper way to do this?
Greet, Anne.
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.
I do wish there was a more robust way to manage this.
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
@imperativity...is there any more official way to do this?
1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
2. Please submit a ticket here (include what you've gathered in step 1).
3. Tag me @NinjaGaijin once you have done so!
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.
In the OVR Avatar uncheck Can Own Microphone.
And now the permissions warning does not appear.