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

backToForeground not working

Open
#497 17 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

backToForeground does not invoke the app when the app is in background or quit state

Steps to Reproduce

I have following code in index.js

const options = {
    ios: {
        appName: 'App Name',
        imageName: 'logo-trans'
    },
    android: {
        alertTitle: 'Permissions required',
        alertDescription: 'This application needs to access your phone accounts',
        cancelButton: 'Cancel',
        okButton: 'Ok',
    }
};
RNCallKeep.setup(options);

messaging().setBackgroundMessageHandler(async remoteMessage => {
    const { data } = remoteMessage;
    if ('voip' === data?.type) {
        RNCallKeep.backToForeground();
        RNCallKeep.displayIncomingCall(data.uuid, data.handle, data.callerName);
        return;
    }
});

displayIncomingCall is invoked but RNCallKeep.backToForeground() does not do anything

Versions

- Callkeep: 4.2.0
- React Native: 0.61
- Android: 10

Logs

Paste here

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 reproduction in index.js and trace the Android implementation of RNCallKeep.backToForeground(), alongside the messaging().setBackgroundMessageHandler callback. Reproduce on Android 10 with the listed versions, then verify that the app is brought to the foreground from both background and quit states while displayIncomingCall still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.