问题
I have an application written in react-native to handle Voip calls between users. I need to wakeup the app upon push notification and show a screen to accept/decline the call.
On iOS there is callkit, is there anything similar for Android?
回答1:
After some researches, I've come up with a solution which integrates some native Android code with the native app. First of all I've used WakefulBroadcastReceiver to wake up our activity process after receiving a push notification, then with a Service I start the ReactActivity and show the custom screen written in Java to handle accept/decline of the call.
I've written a blog post about it with an in-depth example.
来源:https://stackoverflow.com/questions/46113265/how-to-implement-callkit-alike-behaviour-on-android-with-react-native