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

CallKeep UI not showing in terminate state

Open
#588 5 comments 2 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

  • Reproduced on:
  • Android 12

Description

I'm using react native in my application, i want to display callkeep UI when my application is in terminate state.
so i'm using FCM notificaiton to display callkeep ui in terminate state.
In Android callkeep UI showing in foreground state but not in terminate state.
i'm initializing callkeep inside setBackgroundMessageHandler method of FCM.

i have initialise callkeep like below:
RNCallKeep.setup({
ios: {
appName: 'CallKeepDemo',
},
android: {
alertTitle: 'Permissions required',
alertDescription: 'This application needs to access your phone accounts',
cancelButton: 'Cancel',
okButton: 'ok',
foregroundService: {
channelId: 'com.app.demo',
channelName: 'Foreground service for my app',
notificationTitle: 'My app is running on background',
notificationIcon: 'Path to the resource icon of the notification',
},
}
}).then((accepted) => {
console.log("accepted", accepted)
});
RNCallKeep.setAvailable(true);

and then register all callback methods of callkeep and then use displayIncomingCall() to display callkeep UI but i'm getting below error

[RNCallKeepModule] checkPhoneAccountPermission error Activity doesn't exist
[RNCallKeepModule] displayIncomingCall ignored due to no ConnectionService or no phone account

and it will not display callkeep UI.

Versions

- Callkeep: ^4.3.3
- React Native: 0.68.2
- Android: 12
- Phone model:  Redmi 9A

Logs

[RNCallKeepModule] checkPhoneAccountPermission error Activity doesn't exist
[RNCallKeepModule] displayIncomingCall ignored due to no ConnectionService or no phone account

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 setBackgroundMessageHandler flow and the RNCallKeep.setup and displayIncomingCall calls described in the report. Reproduce on Android 12 using the listed versions, then trace the Activity and phone-account errors. Done means the CallKeep UI appears when the application is terminated without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, firebase, react-native
Domain
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.