简体   繁体   English

当Android Webrtc应用程序在后台启动并且有来电时,如何将来电屏幕显示到前台?

[英]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; 请逐步按照此链接操作,以实现所需的功能。

Check this link 检查此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 电话通话结束后,将拨号器应用程序从后台置于前台 - Bring dialer app into foreground from background when phone call is finished 当应用程序在后台时如何显示来电? Android - How to show incoming call when the app is in background? Android Android webRTC 调用前台服务 - Android webRTC call in a Foreground Service Android Twilio Video Call,唤醒应用程序并置于前台 - Android Twilio Video Call, wake up app and bring to foreground 从应用开始通话时将当前活动置于前台 - Bring the current Activity in foreground when a call is starting from app android来电屏幕 - android incoming call screen Android-将应用程序移至后台并移至前景时不维护后退堆栈 - Android - Back stack is not maintained when app is moved to background and bring to foreground Flutter:当应用程序在后台时,如何在 ios 上显示全屏来电? - Flutter: How to display fullscreen incoming call on ios when the app is in background? 当应用程序从后台进入前台时,不调用 Android launchWhenResumed - Android launchWhenResumed is not called when the app comes to foreground from background 如何将监视光传感器的背景安卓应用程序带到前景 - How to bring background android app which monitors light sensor to foreground
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM