question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

backToForeground not working

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

4reactions
ch3tan03commented, Apr 29, 2022

Any update on this?

1reaction
AvibhavChoudharycommented, Oct 19, 2021

I was already calling it in the answer call listener but didn’t work out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bring app back to foreground from code doesn't work on ...
I have found the solution so I'll post it here if someone needs it. The code I use to put the application back...
Read more >
Testing When Mobile Apps Go to Background and Come Back ...
The mobile testing tools available may not be prepared to detect problems related ... mobile applications go to background and then come back...
Read more >
iOS13 keyboard issue when app goes to background state
... and comes back to foreground state. It seems origin.y value is changed incorrectly. The issue does not occur if app does not...
Read more >
react-native-callkeep - npm
Start using react-native-callkeep in your project by running `npm i react-native-callkeep`. There are 2 other projects in the npm registry ...
Read more >
callkeep | Flutter Package - Pub.dev
Even in this scenario, the backToForeground() method will open the app and your call P-C-M will be able to work. push test tool...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found