React Native-在Android(VOIP应用程序)中显示传入视频通话屏幕 [英] React Native - Show incoming video call screen in Android (VOIP app)

查看:397
本文介绍了React Native-在Android(VOIP应用程序)中显示传入视频通话屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在React本机应用程序中实现视频通话功能.我已经使用过对本机twilio视频webrtc进行反应.我已经实现了相同的功能并使其正常工作.

I am trying to implement video calling feature in react native app. I have used React native twilio video webrtc. I have implemented the same and got it working.

我不完全了解移动应用中的视频通话流程. 我用于视频通话的流程如下:

I don't exactly know the flow of Video calling in mobile apps. The flow which I am using for video calling is as follows:

  1. 用户1轻击以呼叫用户2
  2. 您的应用会为房间"生成一个唯一的名称.也许是两个用户ID的组合.
  3. 用户1使用生成的唯一名称连接到Room
  4. 使用FCM,将具有唯一房间名称和令牌的高优先级消息发送给用户2
  5. 用户2收到通知,并且您会显示振铃的用户界面(即使该应用被杀死并且手机已锁定)
  6. 用户2接受并连接到同一房间
  1. User 1 taps to call User 2
  2. Your app generates a unique name for a Room. Perhaps a combination of the two user's IDs.
  3. User 1 connects to Room with generated unique name
  4. Using FCM, send message of high priority with the unique name of the Room and token to User 2
  5. User 2 to receives notification and you display a ringing UI(even when the app is killed and phone is locked)
  6. User 2 accepts and connects to the same Room

现在我停留在第5点. 我正在将FCM通知(显示在托盘(现在使用voip notif )中)发送给user2和 ,现在我需要在user2的移动设备上显示振铃UI,即使该应用被杀死并且手机被锁定. 我该如何实现?

Now I am stuck on point 5. I am sending the FCM notification(which shows up in tray (edit: now using voip notif) to user2 and now I need to show ringing UI on user2's mobile even if the app is killed and phone is locked. How can I achieve this?

我想有一个名为 react-native-callkit 的软件包我应该与 PushKit 一起使用.但是问题出在android flow上. Android不支持PushKit和CallKit.因此,当应用程序处于终止状态时,会出现通知,我需要抓住控件并显示振铃的UI并在手机被锁定且应用程序被终止的情况下唤醒屏幕.

I guess there is a package called react-native-callkit, which I should be using along with PushKit for the same. But the problem is with android flow. PushKit and CallKit is not supported in android. So, when app is in killed state the notification appears I need to grab the control and display ringing UI and wake the screen if the phone is locked and app is killed.

一些困惑

托盘中是否没有显示任何特殊类型的推送通知? (我猜是数据消息和VOIP通知)

Is there any special type of push notification which doesn't get displayed in the tray? (edit: data messages and VOIP notif I guess)

除了 react-native-callkit 之外,是否还有其他软件包(用于显示)铃声UI)可以同时用于android和ios?

Is there any other package than react-native-callkit(for displaying ringing UI) which can be used for both android and ios?

推荐答案

此处是Twilio开发人员的福音.

Twilio developer evangelist here.

Android没有CallKit,但确实提供了 ConnectionService ,以建立来电屏幕通知.我发现没有很多东西可以将ConnectionService与React Native连接起来,因此您可能必须查看

Android doesn't have CallKit, but it does provide the ConnectionService to allow you to build incoming call screen notifications. There's not a lot I can find that connects ConnectionService with React Native, so you may have to check out the Android examples and build this yourself.

对不起,我没有更多帮助.

Sorry I can't be of more help.

这篇关于React Native-在Android(VOIP应用程序)中显示传入视频通话屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆