[英]When Android Webrtc app in background, and call comes in, how to bring an incoming call screen to foreground?
I have a React Native app where I use Webrtc. 我有一个使用Webrtc的React Native应用程序。 When I detect an incoming call, I show a customized screen for the incoming call.
当我检测到来电时,会显示来电的自定义屏幕。
When the app is in the background however, and a call comes in, I want to be able to either: a) bring that incoming call screen to the foreground b) use some sort of native Phone app's incoming call screen 但是,当应用程序在后台运行且有电话打进时,我希望能够:a)将来电屏幕置于前台b)使用某种本机Phone应用程序的来电屏幕
I'm relatively new to Android, but if pointed in the right direction I can probably figure it out. 我是Android的新手,但是如果指向正确的方向,我可能会知道。 I believe I need an Android service that communicates with my RN app so that when a call is detected, that service can do what it needs to do to accomplish either a) or b) above.
我相信我需要一个与我的RN应用进行通信的Android服务,以便在检测到呼叫时,该服务可以执行其完成上述a)或b)所需的操作。
Is this the right direction and is there an easier way? 这是正确的方向吗,有没有更简单的方法?
You can bring call screen to foreground by creating a service in native android studio and connecting it with react native using native module. 您可以通过在本机android studio中创建服务并将其与使用本机模块的react native连接起来,将呼叫屏幕置于前台。
Please follow this link step by step to achieve exactly what you want; 请逐步按照此链接操作,以实现所需的功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.