Xamarin.Forms使用Firebase Cloud Message发送通知 [英] Xamarin.Forms using Firebase Cloud Message to send notification
问题描述
当用户在我的应用上订购某些东西时,我需要发送Web API通知,但是我不知道如何在Xamarin.Forms上将通知发送到Firebase.
I'm need to send my Web API notification when user order something on my app, but i dont know how to send Notification to Firebase on Xamarin.Forms.
有人有一些示例或源代码可以遵循吗?
Does anyone have some sample or source code to follow ?
推荐答案
您需要在特定的Xamarin.Android项目和Xamarin.iOS项目中设置Notification.
You need to set up the Notification in specific Xamarin.Android project and Xamarin.iOS project.
对于 Xamarin.Android :
您可以查看官方文档使用Firebase Cloud Messaging进行远程通知,其中逐步说明了如何使用 Firebase Cloud Messaging
实施远程通知(另请参见在 Xamarin.Android
应用程序中称为推送通知".
You can have a look at official document here and Remote Notifications with Firebase Cloud Messaging, there are step-by-step explanations of how to use Firebase Cloud Messaging
to implement remote notifications (also called push notifications) in a Xamarin.Android
application.
对于 Xamarin.iOS :
您可以使用 Xamarin.Firebase.iOS.CloudMessaging 通过FCM发送iOS推送通知.
You can use Xamarin.Firebase.iOS.CloudMessaging to send iOS push notification by FCM.
这里还有步骤: iOS上的Firebase云消息传递
用于推送通知到本机应用程序的Firebase文档在这里:云消息
Firebase document for push notification to native app is here: cloud-messaging
这篇关于Xamarin.Forms使用Firebase Cloud Message发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!