Unity Mobile Notifications推送问题

1.在部分机型点击通知弹窗进不去游戏

把这里改成自己的Activity

2.推送的时候没有横幅跟icon红点

主要是第一句话 注册的时候选项可以选择

defaultNotificationChannel =

new AndroidNotificationChannel("default_channel", "Default Channel", "For Generic notifications",Importance.High);

csharp 复制代码
        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;
相关推荐
SmalBox1 小时前
【光照】[漫反射diffuse]以UnityURP为例
unity·渲染
SmalBox21 小时前
【光照】[自发光Emission]以UnityURP为例
unity·渲染
SmalBox2 天前
【光照】Unity中的[经验模型]
unity·渲染
萘柰奈2 天前
Unity学习----【进阶】TextMeshPro学习(三)--进阶知识点(TMP基础设置,材质球相关,两个辅助工具类)
学习·unity
Yasin Chen2 天前
Unity UI坐标说明
ui·unity
应用市场2 天前
无人机姿态控制系统详解与实现
游戏引擎·cocos2d
陈言必行2 天前
Unity 性能优化 之 编辑器创建资源优化( 工作流 | 场景 | 预制体)
unity·编辑器·游戏引擎
1uther3 天前
Unity核心概念⑨:Screen
开发语言·游戏·unity·c#·游戏引擎
死也不注释3 天前
【Unity UGUI 交互组件——Slider(7)】
unity·游戏引擎·交互
程序猿多布3 天前
XLua教程之热补丁技术
unity·c#·lua·xlua