ionic-cli 3,
icon.png .
platforms/android/res/drawable/icon.png
, Android.
Once this is done (make sure the image is a transparent icon)
The next step is to initialize this icon in the notification.init function.
Now, if you use push plugin
follow these steps:
const pushObj: PushObject = this.push.init({
android: {
senderID: "your_id",
icon: "icon",
forceShow: "true"
},
ios: {
alert: "true",
badge: "true",
sound: "true"
}
});
As you can see, only the icon name is not extenstion added.
Once this is done, add the same pair of key values ββto the server-side code that clicks the notification on your device.
Everything will work well.
source
share