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;
相关推荐
两水先木示5 分钟前
【Unity】刮刮乐案例-RenderTexture实现思路
unity·游戏引擎
学术小李9 小时前
用虚幻引擎(UE)打开Obj模型
游戏引擎·虚幻
张不无-Unity10 小时前
Unity的四种灯光Directional、Point、Spot 和 Area
unity·游戏引擎
淡海水2 天前
02-02-原理篇-Scriban模板引擎原理深度解析
unity·excel·游戏开发·luban
ttod_qzstudio3 天前
系统架构设计师论文逐句拆解(三):ATAM 架构评估,怎样把“方案比较”写成质量属性权衡
unity·架构·系统架构·软考
小贺儿开发4 天前
Unity 轻量级外部素材加载器(热更新)
科技·学习·unity·程序员·工具·热更新·ugui
淡海水6 天前
01-03-认知篇-基础-Excel配置工作流痛点深度分析
unity·架构·excel·游戏开发·luban
谙弆悕博士6 天前
生物启发式集群(Swarm)工程实现:五条规则、一群蚂蚁和四十个粒子
人工智能·gpt·游戏引擎·cocos2d·蚁群算法·多智能体·boids
Frankie_stand7 天前
无人机售后故障处理全流程:从受理、SLA 时限到责任划分与改进闭环
游戏引擎·无人机·cocos2d
zdr尽职尽责15 天前
UnityCli 兼容2022版本
ui·unity·ai·c#·游戏引擎