当前位置:   article > 正文

Unity Mobile Notifications推送问题

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;

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/322687
推荐阅读
相关标签
  

闽ICP备14008679号