react-native-webrtc / react-native-webrtc/react-native-callkeep

[Android] ACTION_DID_CHANGE_AUDIO_ROUTE event is not received when call is on hold and toggleAudioRouteSpeaker is called

Open
#676 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
511
Avg merge
9h 12m
Merged PRs (30d)
2

Description

Bug report

  • I've checked the example to reproduce the issue.

  • Reproduced on:

  • Android

  • iOS

Description

When calling RNCallKeep.toggleAudioRouteSpeaker the native RNCallKeep: [VoiceConnection] onCallAudioStateChanged and RNCallKeep: [RNCallKeepModule][onReceive] ACTION_DID_CHANGE_AUDIO_ROUTE will fire, allowing you to handle the event in the "didChangeAudioRoute" callback. However, when the call is on hold, calling RNCallKeep.toggleAudioRouteSpeaker does trigger the RNCallKeep: [RNCallKeepModule] toggleAudioRouteSpeaker native event, and the change is reflected in the native call screen, but the [VoiceConnection] onCallAudioStateChanged and ACTION_DID_CHANGE_AUDIO_ROUTE events don't fire, so you can't handle the event in the "didChangeAudioRoute" callback.

However, when calling RNCallKeep.setMutedCall while the call is on hold, the native [VoiceConnection] onCallAudioStateChanged and ACTION_DID_CHANGE_AUDIO_ROUTE do fire, so it does not appear that these events cannot be fired when the call is on hold.

A related issue is that when the call is on hold, none of the actions you make from the native call screen trigger CallKeep events.

Versions

  • Callkeep: 4.3.6
  • React Native: 0.68.2
  • iOS:
  • Android: 11
  • Phone model: G91S

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android implementation behind RNCallKeep.toggleAudioRouteSpeaker and trace VoiceConnection.onCallAudioStateChanged through the ACTION_DID_CHANGE_AUDIO_ROUTE delivery path. Compare that behavior with setMutedCall while a call is on hold, using the example reproduction on Android 11. Done means the audio-route change produces the expected events and reaches the didChangeAudioRoute callback during a held call.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.