Skip to content

Commit d4da6f4

Browse files
committed
Remove the copy-resources.js build hook
The build hook has been replaced with a <resource-file /> directive.
1 parent 52eadc7 commit d4da6f4

File tree

2 files changed

+8
-26
lines changed

2 files changed

+8
-26
lines changed

doc/cloud-messaging.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ curl -X POST -H "Authorization: key=<server-key>" -H "Content-Type: application/
3939

4040
### Custom notification icon (optional)
4141

42-
An Android [notification icon](https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html) can be provided via the plugin variable `ANDROID_NOTIFICATION_ICON`. To configure a notification icon a resource id of an Android drawable inside the Android platforms `res` folder has to be specified. A build hook can be used to copy the notification icon from your project into the `android` platform `res` folder. See the [example project](../example/cordova/scripts/android/copy-resources.js) for a snippet to get you started.
42+
An Android [notification icon](https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html) can be provided via the plugin variable `ANDROID_NOTIFICATION_ICON`. To configure a notification icon a
43+
resource id of an Android drawable can be specified. The `<resource-file />` cordova directive can be used to copy the file into the Android folder `app/src/main/res/`. See the [example
44+
config.xml](../example/cordova/config.xml) for a snippet to get you started.
4345

4446
The icon can be configured inside your apps `config.xml`:
4547

4648
```xml
4749
<plugin name="tabris-plugin-firebase" spec="^2.0.0">
4850
<variable name="ANDROID_NOTIFICATION_ICON" value="@drawable/ic_notification" />
4951
</plugin>
52+
53+
<platform name="android">
54+
<resource-file src="res/android/drawable-xhdpi/ic_notification.png"
55+
target="app/src/main/res/drawable-xhdpi/ic_notification.png" />
56+
</platform>
5057
```
5158

5259
When no notification icon is specified, the outline of the app icon is used.

example/cordova/scripts/android/copy-resources.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)