MicrophoneType: Photon not working on ANDROID

edited February 7 in Photon Voice
The issue now is that in Android with Unity 2019.2.9f1 the Photon Microphonetype does not work. My original post had an issue about rejoining rooms that has been solved (see below).


Same issue that has been found before but different error?. Microphone works well on first join but after exiting and rejoining room it has a lot of issues connecting and working. When looking from the editor project I can see that the client state (in PhotonVoiceNetwork) changes from "Joining" to "ConnectingToMasterserver" and the current server address keeps changing:



  • Alex_HAlex_H
    edited February 7
    Ok so this is what I get when it works (first time connecting) in the logs:


    and the following after disconnecting and trying to rejoin:


    Sometimes after a looong time it actually joins and it starts working
  • Alright latest news, seems to be that when unchecking "Use PUN's App settings" in PhotonVoiceNetwork and just adding the settings to the PhotonVoiceNetwork component then everything seems to work well.
  • Alex_HAlex_H
    edited February 7
    I also changed the MicrophoneType to Photon to test and it does not work with Android builds, any idea why it might be?

    Everything is fine with Unity type
  • Alright so when checking the GameObject with the photonvoice corresponding to the android device from the Unity project I see this flat:


    As opposed to seeing the waves when some other client with audio works. This also only happens when having Photon MicrophoneType everything is fine with Unity type
  • Hi @Alex_H,

    You are reporting two different issues:

    1. Rejoin or switch rooms issue: fixed in 2.13

    Rejoining rooms with "Use PUN's App Settings" checked should work as expected.
    We tested this and we have customers who tested this.
    Just make sure to update to latest version (2.13) properly.

    2. Android issue with MicrophoneType Photon:

    Increase log levels of the Voice components (not only PhotonVoiceNetwork) and check the logs.
  • 1.Yes I left the original post for information. I am in version 2.13 and it doesn't rejoin properly unless I uncheck "Use PUN's App Settings" and set my settings by hand. Setting the Id by hand and the rest of info (I am using a region specifically "us") then it rejoins no issue (I am also using a different appID for voice and PUN, this might be relevant).

    2. The current issue with Android seems to be that the MicrophoneType: Photon simply doesn't work when I deploy a build on device, everything is perfectly fine under MicrophoneType: Unity. To be more specific I tried deploying to several different android devices and created rooms with them in it and I checked logs from the PC (Unity project in Play mode), everything seems fine but I get no audio from the android clients (on android devices). The picture of the flat speaker is from play mode and corresponds to the android users' prefabs that own the PhotonVoiceView as seen by the client from the PC.
  • 1. Not sure why it does not work for you. Having separate AppIDs is not relevant (it's the expected way). Setting an explicit region is also not relevant. Maybe your PhotonVoiceNetwork.AutoConnectAndJoin or PhotonVoiceNetwork.AutoDisconnectAndLeave are not set to true? or maybe you join and leave voice rooms, explicitly via code.

    2. What Android devices & OS versions did you test this with? What Unity version? did you make sure to have the Android libs required? No errors from Recorder component?
  • Alex_HAlex_H
    edited February 10
    1. Both are set to true, and I don't join voice rooms as I simply let PUN create the room and transition to the scene where the PhotonVoiceNetwork is in. I also have tried removing the GameObject with the PhotonVoiceNetwork (since its loaded as DontdestroyonLoad) when exiting a room so it's all clean when re-entering the scene, and it still fails.

    2. No errors from the recorder of the client in the PC (from the unity project I don't have the android device connected but I should probably try that see if I get any logs). I tried with Galaxy Note 9 with Android 9 and a Huawei P20 with Android 9 as well. Unity version is 2019.2.9f1. As for the Android libs are you referring to the libopus libraries in Photon Voice?

  • JohnTubeJohnTube mod
    edited February 11
    1. Weird. Maybe you are using the same UserId from different players which prevents the client from joining?
    2. libopus libs yes.
  • Libs are there, I will get back to this issue in a couple weeks and try to debug better, we are using unity type microphone with AEC for now, but I definitely want to get the native microphone working. I will report once I am back to it.
Sign In or Register to comment.