1.在部分机型点击通知弹窗进不去游戏
把这里改成自己的Activity
2.推送的时候没有横幅跟icon红点
主要是第一句话 注册的时候选项可以选择
defaultNotificationChannel =
new AndroidNotificationChannel(“default_channel”, “Default Channel”, “For Generic notifications”,Importance.High);
defaultNotificationChannel =
new AndroidNotificationChannel("default_channel", "Default Channel", "For Generic notifications",Importance.High);
AndroidNotificationCenter.RegisterNotificationChannel(defaultNotificationChannel);
AndroidNotificationCenter.NotificationReceivedCallback receivedNotificationHandler = delegate (AndroidNotificationIntentData data)
{
var msg = "Notification received : " + data.Id + "\n";
msg += "\n Notification received: ";
msg += "\n .Title: " + data.Notification.Title;
msg += "\n .Body: " + data.Notification.Text;
msg += "\n .Channel: " + data.Channel;
Debug.Log(msg);
};
AndroidNotificationCenter.OnNotificationReceived += receivedNotificationHandler;