xamarin android事件收到通知



我正在为通知接收事件寻找一个事件,它看起来存在于firebase中,但我找不到Xamarin 的实现

https://firebase.google.com/docs/cloud-messaging/android/receive

难道这根本不存在吗?

这在文档中有介绍

[Service]
[IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })]
public class MyFirebaseMessagingService : FirebaseMessagingService
{
const string TAG = "MyFirebaseMsgService";
public override void OnMessageReceived(RemoteMessage message)
{
Log.Debug(TAG, "From: " + message.From);
Log.Debug(TAG, "Notification Message Body: " + message.GetNotification().Body);
}
}

最新更新