How to implement CallKit alike behaviour on Android with react native?

只愿长相守 提交于 2020-07-09 04:08:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!