Skip to content

Commit

Permalink
fix cannot receive answer call on Android 11 (#98)
Browse files Browse the repository at this point in the history
fix cannot receive answer call on Android 11
  • Loading branch information
quango2304 authored Aug 4, 2021
1 parent 948b070 commit 5bb6385
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions android/src/main/java/io/wazo/callkeep/VoiceConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,20 @@ public void onAnswer() {
sendCallRequestToActivity(ACTION_AUDIO_SESSION, handle);
Log.d(TAG, "onAnswer executed");
}


@Override
public void onAnswer(int videoState) {
super.onAnswer(videoState);
Log.d(TAG, "onAnswer called");

setConnectionCapabilities(getConnectionCapabilities() | Connection.CAPABILITY_HOLD);
setAudioModeIsVoip(true);

sendCallRequestToActivity(ACTION_ANSWER_CALL, handle);
sendCallRequestToActivity(ACTION_AUDIO_SESSION, handle);
Log.d(TAG, "onAnswer executed");
}

@Override
public void onPlayDtmfTone(char dtmf) {
Expand Down

0 comments on commit 5bb6385

Please sign in to comment.