如何改变在Android的解析推送通知图标? [英] How to change Parse push notification icon in android?

查看:147
本文介绍了如何改变在Android的解析推送通知图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序已经使用解析云code发送推送通知user.By默认的通知图标,用于应用程序icon.but我要改变通​​知图标。我在清单XML用这种低于code

In my application i have used parse cloud code for sending push notifications to user.By default notification icon used app icon.but I want to change notification icon . I used this below code in manifest xml

<meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/noti_icon"/>

但是图标不会改变。任何的方式来实现这一目标?

But the icon will not change. Any way to achieve this??

推荐答案

在PushService,每个 setDefaultPushCallback的()订阅()方法可以让一个额外的参数指定的图标:

In PushService, each of the setDefaultPushCallback() and subscribe() methods allows an extra parameter to specify the icon:

PushService.setDefaultPushCallback(context, SomeActivity.class, R.drawable.customIcon)

PushService.subscribe(context, "ChannelName", SomeActivity.class, R.drawable.customIcon)

希望它可以帮助你。

Hope it helps you.

这篇关于如何改变在Android的解析推送通知图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆