如何根据 Android 中的 Urban Airship Pushnotification 的额外值更改状态栏图标
我正在使用 Urban Airship PushNotification 开发一个应用程序。它对我有用,我也能够收到推送通知。我的要求是通过 Pushnotification 我传递一个额外值,我想根据额外值更改通知的状态栏图标。假设如果额外值是“1”,我想显示我的应用程序图标,如果它是“ 2' 我想显示另一个图标。请帮忙。
I am developing an app with Urban Airship PushNotification. It is working for me, I am able to get the push notification also. My requirement is with Pushnotification I am passing an Extra Value, I want to change the status bar icon for the notification based on the Extra Value.Assume If the Extra Value is '1' I want to show my App Icon, if it is '2' I want to show another icon. Please Help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议禁用 Urban Airship 的通知并手动处理推送事件。
要禁用 Urban Airship 的通知,请覆盖
BasicPushNotificationBuilder
:然后实现意图接收器 根据此处的文档,并创建您自己的
通知
以满足您的规范。I would suggest disabling Urban Airship's notifications and handling the Push events manually.
To disable Urban Airship's notifications, override
BasicPushNotificationBuilder
:Then implement an intent receiver according to the documentation here, and create your own
Notification
to meet your spec.