How to change the notification message in Android to localised it? I just want to change the message what I get from Urban AirShip before it will be display on notification bar?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I found the solution, its kind a dirty one, but right know I need to use this. Just after get notification from Urban AirShip I cancel all and send my own with changed message.
You can using this method:
PushManager.shared().setNotificationBuilder(null);
and send your own notification with android notification from the SDKI read the answers and came up with a combined solution.
You want to disable UrbanAirship's default notification handler. If you do that, it won't generate and show you the notifications at all.
PushManager.shared().setNotificationBuilder(null);
(Using David T's suggestion)You want to build your own notification. This can be done inside your
IntentReceiver
. This link will do the trick.Hope this helps others.
Please using that code to disable Urban Airship's notifications, override BasicPushNotificationBuilder:
Yes you can modify the message once you receive the message from Urban AirShip for your internal use in the app but can't show the modified message in the notification bar.
You can check the message in your IntentReceiver