简体   繁体   中英

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. 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

I'm relatively new to Android, but if pointed in the right direction I can probably figure it out. 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.

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.

Please follow this link step by step to achieve exactly what you want;

Check this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM