Closed jpudysz closed 4 years ago
Hi @jpudysz, I'll take a look at your PR soon.
For the backToForeground, I've merged a #223 that will open the app if the activity if not started.
I don't understand the use of openAppFromHeadlessMode
. Is it when you don't have firebase and so not access to setBackgroundMessageHandler ?
It's for the case when my Android app is killed (even with a locked screen).
Current behaviour:
With my PR:
answerCall
I'm opening my app (cold boot) from the headless task and the user is redirected to my call screen UIHello, Im having a similar problem, but I dont know if my implementation is good enough.
When I receive a call Push Notification from setBackgroundMessageHandler
I attach all the event listeners but the app doesnt not open when I answer the IncomingCall.
I tried to install react-native-invoke-app
but I think is deprecated, cuz doesnt work on Android 9 and 10.
I dont know if my problem is related to this.
Hi @maitzeth, I think you need backToForeground on Android to open you app.
Hi @maitzeth, I think you need backToForeground on Android to open you app.
Hello @manuquentin yes, I saw your last PR from yesterday.
This feature was needed. Thank you!
I have a little question: There is a way to open the app on setBackgroundMessageHandler
from firebase listener instead of firing backToForeground
on answerCall
listener?
Hi @maitzeth,
Yes I see no reason that backToForeground
will not work in setBackgroundMessageHandler
@manuquentin I've write an issue something in Android 9 and 10 in this https://github.com/react-native-webrtc/react-native-callkeep/issues/227#issue-645603593 do you have any idea about this?
Hello everyone, I'm super busy and I can't contribute here, what's more, we are far behind each other. You can check my repo with a few additional improvements for Android (https://github.com/jpudysz/react-native-callkeep) - tested on production as I'm developing for my client's VoIP app.
I tried to create PR here, but I changed backToForeground
logic and it differs from original repo. New functionality such as headless mode, locked screen are strictly connected with this function and I can't merge it. Ideally, we can take my ideas and merge it with the master (I don't mind and you can copy-paste my code under your PR). Ping me if I needed.
PS. I added changelog inside my repo, so you can check new functionalities. @manuquentin if you want to discuss how to merge it or you need some explanation ping/PM me.
Thank you so much @jpudysz . you fork helped me get add functionality that I really needed for my usecase
Thanks alot for sharing.
I'm happy that I was able to help someone. Cheers from Poland!
Thanks you so much @jpudysz , very useful. solved my problem with backforeground and answerCall event. I have a new problem with openAppFromHeadlessMode, when i call it in setBackgroundMessageHandler of firebase with terminated state, it doesn't open my app only show (nativeUI answered) i would like to open my app and show my videocall screen. Additionally, i tried to use backForeground but the app doesn't open.
Thanks you so much @jpudysz , very useful. solved my problem with backforeground and answerCall event. I have a new problem with openAppFromHeadlessMode, when i call it in setBackgroundMessageHandler of firebase with terminated state, it doesn't open my app only show (nativeUI answered) i would like to open my app and show my videocall screen. Additionally, i tried to use backForeground but the app doesn't open.
Any update on this?
@ch3tan03 use this fork https://github.com/jpudysz/react-native-callkeep
hi, any solution for IOS? In case app killed I can not do anything. Can someone help
@fukemy I have strugled a lot with iOS and app being killed. You have to install react-native-voip-push-notification package and adjust the iOS files according to their repo. Documentation is a bit messy but you will basically add lines to AppDelegate.m so it wakes the app. For me, after following instructions, app would start and after 4/5 seconds,it will catch the notification from background message handler. Hope i helped
Hello, I would like to create PR with additional improvements related to headless mode. Before I create PR please let me know if it's needed. My previous PR (#221 ) was left without any response so I'm trying to implement needed features on my fork and I can share them with community.
But let's go back to new improvements: I took code from @manuquentin (#223) and added a few changes:
backToForeground
, just added improvement for silent fail in the headless modeopenAppFromHeadlessMode
which can takecallUUID
and saves itgetExtrasFromHeadlessMode
and redirect to user's call UIWith this PR we would be able to drop additional dependency like
react-native-invoke-app
.Demo: