Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 9246277

Browse files
authored
Add info to specify push notification icon/color
Android Firebase push notifications are configured via the AndroidManifest.xml. Added info how to do this.
1 parent f9e5084 commit 9246277

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

docs/MESSAGING.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ Although using push messages in your Firebase app is really easy setting it up i
88
If you didn't choose this feature during installation you can add `"messaging": true` to `<app-root>/firebase.nativescript.json` and remove the `<app-root>/platforms` folder.
99

1010
### Android
11-
No additional setup required.
11+
12+
#### Push notification icon and color
13+
14+
If you want to use a specific icon for the push notification, it has to be configured in the <application> tag in the AndroidManifest.xml
15+
16+
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
17+
android:resource="@drawable/your_drawable_name" />
18+
<meta-data android:name="com.google.firebase.messaging.default_notification_color"
19+
android:resource="@color/ns_primary" />
20+
21+
#### Background notification quirks
1222

1323
There is a little quirk: you will currently not get the title and body if the notification was received while the application was in the background, but you will get the *data* payload.
1424

0 commit comments

Comments
 (0)