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;
相关推荐
KaGme1 小时前
生成3DGS场景在unity中的呈现
3d·unity·游戏引擎
zyh______11 小时前
关于unity的序列化
unity·游戏引擎
weixin_4093831212 小时前
godot碰撞测试的学习
学习·游戏引擎·godot
电子云与长程纠缠12 小时前
Godot学习06 - AnimationPlayer内置动画
学习·游戏引擎·godot
星夜泊客13 小时前
C# : 引用类型都存在堆上吗
unity·c#
点量云实时渲染-小芹14 小时前
Unity模型数字孪生虚拟仿真webgl推流卡实时云渲染推流
unity·webgl·数字孪生·实时云渲染·虚拟仿真·云推流
mxwin19 小时前
Unity Shader 齐次坐标与透视除法理解 SV_POSITION 的 w 分量
unity·游戏引擎·shader
NPUQS1 天前
【Unity 3D学习】Unity 与 Python 互通入门:点击按钮调用 Python(超简单示例)
学习·3d·unity
电子云与长程纠缠1 天前
Godot学习05 - 播放与分离FBX动画
学习·游戏引擎·godot
小贺儿开发1 天前
【Arduino与Unity交互探究】03 超声波测距模块
unity·arduino·串口通信·传感器·videoplayer·硬件交互