简体   繁体   English

Xamarin Android VOIP 推送通知处理

[英]Xamarin Android VOIP Push notification handling

We are developing an enterprise application using Voice over IP technology with CrossGeek's Firebase Push Notification NuGet.我们正在使用带有 CrossGeek 的 Firebase 推送通知 NuGet 的语音 IP 技术开发企业应用程序。 For VOIP calls, we need to implement a cross platform solution for firing up the application for an incoming voice call.对于 VOIP 呼叫,我们需要实施跨平台解决方案来启动应用程序以接收语音来电。 On iOS the solution is the VOIP push, which is done by implementing PKPushKit.在 iOS 上,解决方案是 VOIP 推送,这是通过实现 PKPushKit 完成的。 Unfortunately we are stucked with Android.不幸的是,我们被 Android 卡住了。 We want to Start the activity when a specific payloaded notification comes, or just display two buttons for the notification one for decline, and one for accept the incoming call.我们希望在特定的有效负载通知到来时启动活动,或者只显示通知的两个按钮,一个用于拒绝,一个用于接受来电。 As I see, this notification plugin that we are using is not supporting the terminated application custom notification handling.如我所见,我们正在使用的这个通知插件不支持终止的应用程序自定义通知处理。 I've found on the StackOverFlow, that we need to extend a custom service from the FirebasePushNotificationService, but it seems this service will catch all the notifications from the NuGet package used to handle notifications.我在 StackOverFlow 上发现,我们需要从 FirebasePushNotificationService 扩展自定义服务,但似乎该服务将捕获来自用于处理通知的 NuGet package 的所有通知。 Any ideas how to handle terminated application VOIP pushes especially for Android platform?任何想法如何处理终止的应用程序 VOIP 推送,特别是对于 Android 平台? Also one more question to mention, what is the right method to handle VOIP Notifications?还有一个问题要提,处理 VOIP 通知的正确方法是什么? Requesting Screen awake, Dismissing keyguard and Starting the activity?请求屏幕唤醒、解除键盘保护并开始活动? Or implement something else?或者实施别的什么?

We had to implement Push notification handling on Android by our own.我们必须自己在 Android 上实现推送通知处理。 You have to derive from FirebaseMessagingService, implement the interface.您必须从 FirebaseMessagingService 派生,实现接口。 It will run as a service, which can handle your Push Notifs.它将作为服务运行,可以处理您的推送通知。 But you have to manually implement the displaying of the notifications to the statusbar, or starting the activity.但是您必须手动实现将通知显示到状态栏或启动活动。

VOIP Notifications require priority set to the highest. VOIP 通知需要将优先级设置为最高。

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

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