Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
298 views
in Technique[技术] by (71.8m points)

Get CallKeep notification when app is in background (React Native iOS)

I'm trying to show a CallKeep notification when app state is in background in iOS. I achieve to show it in Android both ways background and foreground but in iOS it only works the foreground notification. I'm using FCM to receive the notification using setBackgroundMessageHandler(), where I detect if the notification is a call and in case it is true, I display the incoming call with a callkeep notification.

I don't understand why the code doesn't trigger the call notification on iOS when the app state is in background. Also I have two types of notifications the normal ones (like a normal push notification from an app, where you can't answer or decline a call, it just let you know that someone is calling you) this type works in foreground and background on both operating systems (iOS, Android) and the other type of notification is the callkeep ones that just works correctly on Android and let you answer or decline a call.

I want to have the callkeep notification working on background for iOS as well, so the user can answer or decline the call without being inside the application.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...