Reference
全部默认
消息详情

效果


基础内容/展示样式/定制样式
预置在 app 内的样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| @Override public Notification getNotification(Context context, UMessage msg) { switch (msg.builder_id) { case 1: Notification.Builder builder = new Notification.Builder(context); RemoteViews myNotificationView = new RemoteViews(context.getPackageName(), R.layout.notification_view); myNotificationView.setTextViewText(R.id.notification_title, msg.title); myNotificationView.setTextViewText(R.id.notification_text, msg.text); myNotificationView.setImageViewBitmap(R.id.notification_large_icon, getLargeIcon(context, msg)); myNotificationView.setImageViewResource(R.id.notification_small_icon, getSmallIconId(context, msg)); builder.setContent(myNotificationView) .setSmallIcon(getSmallIconId(context, msg)) .setTicker(msg.ticker) .setAutoCancel(true);
return builder.getNotification(); default: return super.getNotification(context, msg); } }
|
消息详情

效果

基础内容/展示样式/图片
上传图片

消息详情

效果

基础内容/自定义图标/应用内图标文件
大图标文件

小图标文件

消息详情

效果


基础内容/自定义图标/上传图标文件
大图标文件

小图标文件

消息详情

效果


基础内容/是否展开/大图
上传图片

消息详情

效果
点击下拉按钮可以显示图片。


目标人群/目标人群/部分用户

按【标签】过滤时提示“无匹配结果”是因为没有用户添加过标签。
目标人群/目标人群/独立用户

目标人群/目标人群/推送时间/定时推送

目标人群/目标人群/推送时间/重复推送

后续行为/后续动作/打开连接(URL)
消息详情

效果
显示效果和默认相同,但是点击后启动浏览器访问 URL。
后续行为/后续动作/打开指定页面
消息详情

效果
显示效果和默认相同,但是点击后打开 app 内的一个 activity,不能是其他 app 的。
后续行为/后续动作/自定义行为
预置在 app 内的处理
1 2 3 4
| @Override public void dealWithCustomAction(Context context, UMessage msg) { Toast.makeText(context, msg.custom, Toast.LENGTH_LONG).show(); }
|
消息详情

效果
显示效果和默认相同,但是点击后触发回调。
后续行为/后续动作/自定义参数
消息详情

效果
显示效果和默认相同,但是点击后在触发 4 个可选【后续动作】中对应的回调的同时,会传递参数。

后续行为/系统通道/MIUI、EMUI、Flyme系统设备离线转为系统下发
TODO 暂不清楚是干啥的。
后续行为/提醒方式

后续行为/高级设置/限制发送速度

后续行为/高级设置/消息触发器
为用户加上标签,方便推送时按照标签来筛选。
