I want to create a mobile game that just needs the audio to be one way. And it doesn’t feel nice that the audience side somehow gets microphone requirement popup when they won’t use microphone. Is there a way to avoid it?
EDIT: See my next message in the thread to see if the below steps are necessary because you are already not requesting the mic permission at runtime in your code.
For Android, check this documentation from Unity SDK v15. It’s still valid for Unity SDK v16.
https://docs.vivox.com/v5/general/unity/15_1_230000/en-us/Default.htm#Unity/developer-guide/android/android-sdk-permission-requirements.htm
I think you need to do what’s described after “To remove optional permissions that you do not want in your application…” and you would need to remove android.permission.RECORD_AUDIO
.
As for iOS, I think you might just be able to remove microphone requirements from your app’s plist.
Which platform are you wondering about currently?
To clarify, did you see the microphone permissions request with your own app or one of our sample apps? If it was with one of our sample apps, you would have seen the mic permission request because it is explicitly asked for at runtime. You just need to leave that code out from your own app.
I was guessing that you already weren’t doing that, but it wasn’t clear. If you already weren’t doing that, then my guess was that some device you were testing with would ask for the permission even without the explicit runtime code for that.
Sorry for late reply.
imagine a game, that the host can talk but the guest can’t talk and only can hear, so overall the app needs microphone permission.
it seems the app triggers the popup when I call function:
await VivoxService.Instance.JoinGroupChannelAsync(<id>, ChatCapability.TextAndAudio)
I have called this function before calling the join function
VivoxService.Instance.MuteInputDevice();
MuteInputDevice()
silences the audio that is retrieved from the capture device but doesn’t prevent the device from being opened. It is a “soft mute” which is useful because it is less disruptive to the OS and audio subsystem to just keep things running but discard the audio.
You should try setting the input device to “No Device”. Check the VivoxService.AvailableInputDevices
for the “none” device. Then call its VivoxInputDevice.SetActiveDeviceAsync()
. If the popup is from Vivox opening the capture device then this will actually prevent that. Let me know if that helps.
oh. it seems working. thx