Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Improve the docs around specifying notification_color #947

Merged
merged 4 commits into from
Apr 10, 2020

Conversation

robwalkerco
Copy link
Contributor

No description provided.

@krozett
Copy link

krozett commented Dec 11, 2018

@robwalkerco Thanks! Although I also found that the file name given is wrong. It has to be android/app/src/main/res/values/colors.xml (note the 'main').

@robwalkerco
Copy link
Contributor Author

@krozett I've checked. but I can't find anything that needs to be changed.
The correct filename is specified at https://github.com/zo0r/react-native-push-notification/pull/947/files#diff-04c6e90faac2675aa89e2176d2eec7d8R126

@krozett
Copy link

krozett commented Dec 17, 2018

@robwalkerco I don't have any res subdirectory in android/app/src. Putting the colors.xml file where the docs suggest doesn't work for me, because that directory doesn't exist. Here's what my tree looks like:

android/app/src
└── main
   ├── AndroidManifest.xml
   ├── assets
   │  └── fonts
   ├── java
   └── res
      ├── mipmap-hdpi
      │  ├── ic_launcher.png
      │  └── ic_launcher_round.png
      ├── mipmap-mdpi
      │  ├── ic_launcher.png
      │  └── ic_launcher_round.png
      ├── mipmap-xhdpi
      │  ├── ic_launcher.png
      │  └── ic_launcher_round.png
      ├── mipmap-xxhdpi
      │  ├── ic_launcher.png
      │  └── ic_launcher_round.png
      ├── mipmap-xxxhdpi
      │  ├── ic_launcher.png
      │  └── ic_launcher_round.png
      └── values
         ├── strings.xml
         └── styles.xml

I just created a brand new fake project with react-native init. It created the exact same structure. Have you actually followed the documentation? If it works for you, maybe your RN is out of date.

@robwalkerco
Copy link
Contributor Author

@krozett you’ve already got strings.xml and styles.xml in the folder where colors.xml needs to go. Just create the file there.

@krozett
Copy link

krozett commented Dec 18, 2018

@robwalkerco That's exactly what I did. My issue is that the directory in the docs is wrong.

@robwalkerco
Copy link
Contributor Author

Got you @krozett
Just updated it.

@krozett
Copy link

krozett commented Dec 18, 2018

@robwalkerco Almost got it. The path should be android/app/src/main/res/values/colors.xml.

@robwalkerco
Copy link
Contributor Author

Thanks @krozett

Copy link

@mmccartney mmccartney left a comment

Choose a reason for hiding this comment

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

This is a helpful PR. I got tripped up on this when trying to implement colors. This fixes 2 issues with the documentation:

  1. The path to the colors.xml was missing /main/
  2. The meta-data reference had android: that shouldn't be there

mmccartney pushed a commit to mmccartney/react-native-push-notification that referenced this pull request Feb 15, 2019
@Dallas62 Dallas62 self-assigned this Apr 10, 2020
@Dallas62 Dallas62 merged commit b1e84b2 into zo0r:master Apr 10, 2020
@robwalkerco robwalkerco deleted the patch-1 branch April 10, 2020 11:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants