Changing icon for Android Push Notifications on Server-side
We are using UTNotifications for our local push notifications. Using Android standard, we have put in a replacement icon to appear on devices when receiving a push.
The issue is that the same function is not working for our server-side pushes from Parse. We added this line to our manifest
<meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/noti_icon"/>
And added an icon to the "/drawable/"folder, but it only retrieves the icon for local pushes. Using Unity and Parse, what am I missing that gets this to work correctly?
Answer by Yuriy-Ivanov · Oct 16, 2015 at 02:38 AM
Hi @Whelandrew,
Please correct me if I'm wrong, but as far as I understand you use UTNotifications at client side for both local and push notifications, don't you? Because if yes, you don't need that <meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/noti_icon"/>
block in the manifest, UTNotifications manage icons in a different way. If no then, first, I recommend you to use UTNotifications for push notifications as well. Second, I can't say much about the Parse-related issues, but possible problem is a location of the "drawable" folder: Unity since the version 5.2 ignores Assets/Plugins/Android/res folder, you have to put your drawables into one of the native plugins' folder, f.e. UTNotifications use Assets/Plugins/Android/UTNotifications/res/drawable (but you don't have to do it manually with UTNotifications, everything is configured using its Unity editor extension).
And, yeah, if you use UTNotifications on the client side for push notifications, setting a custom icon is being done using notification profiles. You can find more about their usage in the UTNotifications' manual: Edit -> Project Settings -> UTNotifications -> Manual button, section "Using Notification Profiles (sounds & icons settings)".
Best regards,
Yuriy, Universal Tools team.
Answer by Whelandrew · Oct 16, 2015 at 07:25 PM
The upside is that UTNotifications is working just how we need it to. :)
We are now implementing a Prime31 plugin to help manage push notifications when they are received from the server-side of our game.
We are also still on Unity 4.5.6f so we must apply older techniques to most of our Unity problems. :p
Of course it's up to you, but UTNotifications support Unity 4.5.
Your answer
Follow this Question
Related Questions
Android push notification white icon 0 Answers
Send push notification once in a week with Firebase 0 Answers
How to get Google cloud message after offline? 0 Answers
Error: Input string was not in the correct format - HELP! 0 Answers
pubnub push notifications 0 Answers