How to set a large image in the ionic.io-push notification

in ionic push notifications, we can add an “icon”: “xxxxx” in the “android” array to change the new (small) icon path,

var push = new Ionic.Push({ "debug": true, "pluginConfig": { "android": { "iconColor": "#343434", "icon": "abc" } } }); 

where abc.png is located in the platform / android / res / drawable folder.

but are there any methods to change the big push icon? Since iconColor is valid, but I test many times, I cannot change the background color to a large image.

anyone can help me .. thanks!

+5
source share
2 answers

You can add the image property to the android object, which is a string describing the link to the image in the drawables folder, the resource URI, or the remote URL. Although Ionic Push does not list itself as supporting this feature, actual testing validates it.

Additional information: https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#images

0
source

There is currently no large icon support through the FCM notification message payload. See https://github.com/firebase/quickstart-android/issues/84 . The problem is known, but the problem is closed.

0
source

Source: https://habr.com/ru/post/1235659/


All Articles