To display a custom icon for push notifications on Android, you need to add the icon file to your project's resources and declare it in the AndroidManifest.xml.
Note: For modern Android versions, the status bar icon must be monochrome (white with a transparent background).
Follow these steps:
Prepare Your Icon: Create your notification icon as a small, white icon on a transparent background (e.g.,
notification_icon.png).Place the Icon File: In your Unity project, place the icon file in the following directory:
Assets/Plugins/Android/pushwoosh-resources.androidlib/res/drawable/If this directory does not exist, you may need to create it.
Update
AndroidManifest.xml: Open your main manifest file, typically located atAssets/Plugins/Android/AndroidManifest.xml. Add the following<meta-data>tag inside the<application>tag:<application ...> <!-- Other tags like activity, service, etc. --> <meta-data android:name="com.pushwoosh.notification_icon" android:resource="@drawable/notification_icon" /> </application>Important: Replace
notification_iconwith the name of your icon file, without the.pngextension. After rebuilding your app, new notifications should display your custom icon.
Comments
0 comments
Please sign in to leave a comment.