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.

How to end incoming call(Caller ends call before Callee accepts/picks the call)

See original GitHub issue

Bug report

  • Reproduced on:
  • [x ] Android

Description

Please I am trying to end an incoming call before the callee accepts/picks the call using callkeep. I saw some solutions in a github issue to :

  • Send another push notification that has a data property e.g isMissedCall then call Callkeep method RNCallKeep.reportEndCallWithUUID(uuid, reason); to end the call.The notifcation gets delivered but firebase OnMessageReceived is never called when the call is actively ringing.

  • Establish a connection to your server and then poll your server to check if the call has been rejected. I was able to implement this for IOS and it worked but on android when the call is actively ringing, I guess the javascript part of app does not run when it in the foreground(not sure the exact state but the app is open but not viewing it at that moment) so my setInterval I use to poll my server for the state of the call never runs.

The first solution didn’t work on IOS/Android but the second one works only in IOS.

Please how can I end a call before calllee picks it?

Versions

- Callkeep:4.2.0
- React Native: 0.63.4
- Android: 11
- Phone model: S20 ultra

Logs

Paste here

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
yehyaumarcommented, Dec 22, 2021

@nero2009 I found out how to do it thanks to Romick2005’s help. This is how I do it: When the call initiator cancels the call, I send a silent push notification to the callee. In AppDelegate I listen for this push notification and once it arrives, I terminate callkit like this: int reasonId = 6; [RNCallKeep endCallWithUUID: callId reason: reasonId];

Works perfectly.

1reaction
linus-komnickcommented, Aug 4, 2021

@nero2009 I found out how to do it thanks to Romick2005’s help. This is how I do it: When the call initiator cancels the call, I send a silent push notification to the callee. In AppDelegate I listen for this push notification and once it arrives, I terminate callkit like this: int reasonId = 6; [RNCallKeep endCallWithUUID: callId reason: reasonId];

Read more comments on GitHub >

github_iconTop Results From Across the Web

Power button ends call - Android Accessibility Help
Open your device's Settings app . Tap Accessibility. Turn on Power button ends call.
Read more >
Answer or decline incoming calls on iPhone - Apple Support
Decline a call and send it directly to voicemail · Tap Remind Me, then choose when you want a reminder to return the...
Read more >
Call Blocking Tools and Resources
Call blocking is a tool used by phone companies to stop illegal and unwanted ... may hear a single ring and get caller...
Read more >
How To Block Unwanted Calls | Consumer Advice
Which type of call-blocking or call-labeling technology you use will depend on the phone — whether it's a cell phone, a home phone...
Read more >
Stop Unwanted & Annoying Home Phone Calls - Verizon
Verizon has four ways to help you block calls on your home phone. If you haven't already, sign up for: Call Block; Caller...
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