Skip to content

Commit

Permalink
docs(messaging): avoid illegal hyphen char in notification example xml
Browse files Browse the repository at this point in the history
In the original notification color example the name provided `my-custom-color` will result in an error because '-' is not a valid resource name character. I have updated the example color name to use underscores `my_custom_color` to resolve this.
  • Loading branch information
brennansaul authored Dec 1, 2022
1 parent 73c8389 commit 3676205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/messaging/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ Note that only predefined colors can be used in `firebase.json`. If you want to
```xml
<!-- <projectRoot>/android/app/src/main/res/values/colors.xml -->
<resources>
<color name="my-custom-color">#123456</color>
<color name="my_custom_color">#123456</color>
</resources>

<!-- <projectRoot>/android/app/src/main/AndroidManifest.xml -->
Expand All @@ -486,7 +486,7 @@ Note that only predefined colors can be used in `firebase.json`. If you want to

<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/my-custom-color"
android:resource="@color/my_custom_color"
tools:replace="android:resource" />
</application>
</manifest>
Expand Down

1 comment on commit 3676205

@vercel
Copy link

@vercel vercel bot commented on 3676205 Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.