Skip to content

Commit 5bb6385

Browse files
authored
fix cannot receive answer call on Android 11 (#98)
fix cannot receive answer call on Android 11
1 parent 948b070 commit 5bb6385

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

android/src/main/java/io/wazo/callkeep/VoiceConnection.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ public void onAnswer() {
9191
sendCallRequestToActivity(ACTION_AUDIO_SESSION, handle);
9292
Log.d(TAG, "onAnswer executed");
9393
}
94+
95+
96+
@Override
97+
public void onAnswer(int videoState) {
98+
super.onAnswer(videoState);
99+
Log.d(TAG, "onAnswer called");
100+
101+
setConnectionCapabilities(getConnectionCapabilities() | Connection.CAPABILITY_HOLD);
102+
setAudioModeIsVoip(true);
103+
104+
sendCallRequestToActivity(ACTION_ANSWER_CALL, handle);
105+
sendCallRequestToActivity(ACTION_AUDIO_SESSION, handle);
106+
Log.d(TAG, "onAnswer executed");
107+
}
94108

95109
@Override
96110
public void onPlayDtmfTone(char dtmf) {

0 commit comments

Comments
 (0)