urbanairship / urbanairship-cordova

Urban Airship integration with Apache Cordova
https://docs.airship.com/platform/mobile/setup/sdk/cordova/
Other
142 stars 149 forks source link

value for com.urbanairship.notification_icon #190

Closed thurt closed 7 years ago

thurt commented 7 years ago

I don't understand what values can be substituted for ic_notification in the com.urbanairship.notification_icon rule in the config.xml.

Can I supply a path to an image? Does the value start at a particular folder?

rlepinski commented 7 years ago

@thurt It needs to be the name of a drawable that ends up in your android's resource directory. It looks like you define the icons using resource-file in the config.xml: https://cordova.apache.org/docs/en/latest/config_ref/index.html#resource-file

Example:

<resource-file src="www/res/drawable-mdpi/ic_notification.png” target="res/drawable-mdpi/ic_notification.png" />
<resource-file src="www/res/drawable-hdpi/ic_notification.png" target="res/drawable-hdpi/ic_notification.png" />
<resource-file src="www/res/drawable-xhdpi/ic_notification.png" target="res/drawable-xhdpi/ic_notification.png" />
<resource-file src="www/res/drawable-xxhdpi/ic_notification.png" target="res/drawable-xxhdpi/ic_notification.png" />

<preference name="com.urbanairship.notification_icon" value="ic_notification" />