react-native-webrtc / react-native-webrtc/react-native-callkeep
[ANDROID] didActivateAudioSession is not triggered in Android
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
In iOS works fine, but when I'm calling another number, the ringtone inside the listener (described in docs) is not working.
The listener is triggered only in iOS.
Is there any solution?
My code:
RNCallKeep.addEventListener('didActivateAudioSession', () => {
endpoint.activateAudioSession();
if (outgoingCall) {
setTimeout(() => {
ringtone = new Sound('tone.mp3', Sound.MAIN_BUNDLE, error => {
if (error) {
console.log('failed to load the sound', error);
return;
}
ringtone?.setVolume(1);
ringtone?.setNumberOfLoops(-1);
ringtone?.play((success: any) => {
if (success) {
console.log('successfully finished playing');
} else {
console.log('playback failed due to audio decoding errors');
}
});
});
}, 500);
}
});
Steps to Reproduce
Versions
- Callkeep: 4.3.3
- React Native: 0.66.3
- iOS: -
- Android: 12
- Phone model: Pixel 4
Logs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Android implementation of the didActivateAudioSession event and compare it with the iOS behavior described in the issue. Reproduce the outgoing-call flow on Android 12 using the supplied listener and determine whether the event is emitted; done means the expected listener behavior is verified on Android and covered by an appropriate test or documented reproduction.
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
- Needs clarification
- Newbie friendliness
- 25/100