本文主要是介绍Unity Mobile Notifications推送问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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;
这篇关于Unity Mobile Notifications推送问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!