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

Allow command-line deployment for Android, and making FCM-first. #836

Closed
wants to merge 16 commits into from

Conversation

rhdeck
Copy link

@rhdeck rhdeck commented Aug 21, 2018

Address issue #827 and #828.

  1. Removes excess files not necessary for RN android modules. (IML and Proguard)
  2. Add react-native-update-gradle peer dependency to allow modern build process
  3. Add manifest XML file to the module so it just gets merged in
  4. Update gradle files to reference the google-services.json
  5. Fix code to be firebase-first (including handling onNewToken transparently via registration callback)
  6. Fixing auto-deployment at react-native link via prelink script and adding rnpm reference to package.json
  7. Adding support for react-native add-google-services via plugin.js and rnpm reference in package.json

Usage for testing:

react-native init mytest
yarn add rhdeck/react-native-push-notification react-native-update-gradle
react-native link
react-native add-google-services /path/to/my/google-services.json
react-native run-android

Or, if you're like me and into native dev:

yarn add react-native-android-studio
react-native studio

(Gradle synch isn't perfect in android studio right now. I sometimes have to "sync gradle with files" under the "File" menu to get things to build. This is not specific to the PR, but is general to using new gradle)

@sraka1
Copy link

sraka1 commented Jan 30, 2019

@rhdeck are you using this in production? I assume this needs to be merged sometime soon anyways, since GCM is being deprecated in April...

@rhdeck
Copy link
Author

rhdeck commented Jan 30, 2019

Yes, we use this in production, and it's been smooth enough that I haven't given it a thought in a few months.

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.

IMO this is the most import PR for this project because it adds onNewToken() and adopts the new FirebaseInstanceId API. I also appreciate the attempt to automate the changes build.gradle and AndroidManifest.xml.

@rhdeck
Copy link
Author

rhdeck commented Feb 15, 2019 via email

@mmccartney
Copy link

Happy to help try to move things along. You have a conflict in package.json because the version number has already been incremented. It might help to rebase. Also, consider changing testCompile to testImplementation.

I'm going to try creating a fork that merges this and other PRs in hopes to catch up on the backlog of changes. I really want to use this project for my app but if I can't get Android working in the next few days, I'm going to have to switch to something else... :-(

mmccartney pushed a commit to mmccartney/react-native-push-notification that referenced this pull request Feb 15, 2019
@rhdeck
Copy link
Author

rhdeck commented Feb 15, 2019

Merged with current rev on my end, clearing the conflict.

@sraka1
Copy link

sraka1 commented Mar 6, 2019

@rhdeck I think there are README changes needed for this as well before it can get merged... (and by changes I mean removing whole lot, since this simplifies things quite a bit)

@rhdeck
Copy link
Author

rhdeck commented Mar 6, 2019

I concur with your point. Will check it out.

@Dallas62 Dallas62 self-assigned this Apr 10, 2020
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 11, 2021
@github-actions github-actions bot closed this May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants