My app has failed submission, partly for asking for excessive user permissions.
I need to request the RECORD_AUDIO permission as my app uses the Microphone input for voice chat, and voice search.
I understand that in Marshmallow this permission was classified as a 'dangerous' permission and that dangerous permissions must be asked at run-time. But is that not what the Gear-VR permission dialog requests in VR-mode are doing? I think they are handling this correctly, requesting the permission right after launching the app.
Below is a screen shot of the Functional test failure, and you can see that it both failed and succeeded on Lolipop and Marshmallow, but on different devices. The language "App ask to recored audio" is a bit confusing. It does appear that the app does ask to record audio, so we are thinking that maybe the assumption is that the app is asking for the audio permission inappropriately.
Clearly we are asking for this permission incorrectly, but we could use a bit of direction on how to ask for it in the appropriate way.
I am facing the same problem and I have no idea where these permissions come from. I don't have any permission in my main manifest file. I believe this is coming from one of plugins I am using. Any Idea how to get rid of this?
Unity will try to generate an android.manifest file for you when you build your apk based upon the calls included in your code. For example, if you have a script that calls one of Unity's Microphone functions, it will try to add the RECORD_AUDIO permission. The same holds for any plug-ins you are using - Unity will scan the function calls made by them and add permissions as needed - whether you are actually calling that code or not.
To resolve this, you'll need to either: a) Remove the plug-in (which isn't exactly feasible) or b) unpack the apk, manually modify the manifest file, and then repack the apk.
The Oculus SDK used to have a microphone script (I assume the latest versions do too but haven't upgraded in a while). I deleted that script (named 'microphone' or 'voip' I think) and the record_audio permission disappeared.
If you have integrated a number of packages into your project, you may have multiple "Plugins" directories, each of which may have a "AndroidManifest.xml". You could search for all the manifests, and find one that contains the RECORD_AUDIO permission. That will tell you which library requests that permission.