Closed zhangshaoju1987 closed 3 years ago
Today, I got the same issue.
After checking the native log android. I realized the value of audioDevices
is []. It mean: updateAudioDeviceState()
has not be call. You can see that code will update the value of audioDevices
// Update the set of available audio devices. Set
newAudioDevices = new HashSet<>(); // Update the existing audio device set. audioDevices = newAudioDevices;
So, I called IncallManager.start()
When my app start. Then it works.
About the stop
. You can call IncallManager.stop()
to stop event, state .... But with my app, I just need to stop this when the application has been kill. Fortunately, IncallManager
has done for us that in native code.
@Override public void onHostDestroy() { Log.d(TAG, "InCallManager:onDestroy()"); stopRingtone(); stopRingback(); stopBusytone(); stop(); }
InCallManager.setForceSpeakerphoneOn(0)
try with that
InCallManager.setForceSpeakerphoneOn(1)
setForceSpeakerphoneOn work well on IOS,but not work on Android
when I call it , I got them error info below: selectAudioDevice() Can not select EARPIECE from available [] selectAudioDevice() Can not select SPEAKER_PHONE from available []
Is there anything I missing/forget to do? I just use this api setForceSpeakerphoneOn only.