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.

DisplayIncomingCall UI is not working in Android.

See original GitHub issue

Bug report

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

  • Reproduced on:

  • Android

  • iOS

Description

I have integrated RNCallKeep as per the guidance specified in repo, It looks strange that it is able to show displayIncomingCallUI on iOS, however it seems to be not working in android. it seems so strange that the code is similar which means, when we replicate the code as per the demo, it should work irrespective of the platforms. How come it won’t work for android, even after following setup instructions and demo example. Can anyone help me where I am committing a mistake.

Steps to Reproduce

Code

const options = {
      ios: {
        appName: "Sovereign Wallet",
      },
      android: {
        alertTitle: "Permissions required",
        alertDescription: "This application needs to access your phone accounts",
        cancelButton: "Cancel",
        okButton: "ok",
        additionalPermissions: [PermissionsAndroid.PERMISSIONS.READ_CONTACTS]
      },
    };

    try {
      RNCallKeep.setup(options);
      RNCallKeep.setAvailable(true); // Only used for Android, see doc above.
    } catch (err) {
      console.error('initializeCallKeep error:', err.message);
    }

    RNCallKeep.addEventListener('answerCall', this.onAnswerCallAction);
    RNCallKeep.addEventListener('endCall', this.onEndCallAction);

Displaying like this when on a push notification RNCallKeep.displayIncomingCall(this.getCurrentCallId(), "XX Name", 749nsusd7b, "",true);

Versions

- Callkeep: 3.0.12
- React Native: 0.59.9
- iOS: 
- Android: android 7.1.1
- Phone model: Samsung A51, oppo 

Logs

Paste here

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
dariomalfatti-centropaghecommented, Oct 2, 2020

In my case, after following the example and getting it not working, I added this permission and the UI started working. The first time it asks you to add your app to your phone account and after that it will works pretty well.

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
0reactions
timorsscommented, Jul 6, 2021

any news about this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix display not waking up with incoming calls issue
If your screen is not waking up when someone calls you and you have to manually ... Method 1 – For Phones running...
Read more >
Android.ConnectionService Incoming call UI not showing ...
I am building basic calling app using TelecomManager, ConnectionService and Connection. But, When an there is an incoming call, ...
Read more >
React-native-callkeep - npm.io
Android supports calling apps running in what's called "Self Managed". ... If not the user will be stuck in the build UI screen...
Read more >
Build a calling app | Android Developers
Calling apps use their own user interface for the calls instead of ... To answer incoming calls when there are no active calls...
Read more >
Using Native Incoming Call UI for your React Native App (How ...
displayIncomingCall and RNCallKeep.endCall . Initial problems with android. After my initial experiments with callkeep it seemed that IOS worked ...
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