Open
Conversation
This is a doozy of a change, but it builds successfully. This may justify a hard fork, since GCM is no longer relevant. Unsure if the module as built will actually work, and what the implications are for backwards compatibility. Libs updated, version bumped, and build files removed since they are no longer needed after Ti SDK 7+.
SInce we have no control over Titanium's generated gradle file, and we cannot put the file where it should be anyways, we have to manually load the json and attempt to configure the FirebaseApp with it.
IIDService now broadcasts an Intent which GCMModule listens for. If during registration the token is not yet available, a flag is set, and once the token is refreshed the success callback is called. The way we aren't sending an error immediately, but there is no guarantee that success or error will be called.
Prevent FirebaseInitProvider from automatically initializing since we initialize manually (see https://firebase.googleblog.com/2017/03/take-control-of-your-firebase-init-on.html) Added receivers that are not being added by Firebase (see https://github.com/hansemannn/titanium-firebase-cloud-messaging/blob/86e7655433bb149809ee3dddd7d0a430f1ce3304/android/timodule.xml).
You can now pass the google-services.json contents to the `firebaseConfig` parameter in `registerPush()`, which is useful if you have different configurations for development and production builds. Updated documention with information about Firebase requiring SHA1 in order to receive messages and upgrade to v3 info. Also removed unneccessarily complicated IID broadcast receiver.
moved creation of channelId up to take effect.
Update FCMService.java to properly handle Android O notification channels
Contributor
Author
|
OK, I see. Apologies for my confusion, I forked this a long time ago and haven't been back in since. My fork code is "version 3.0". It was meant to be a contribution back to the main repo here but it looks like maybe this is no longer being maintained. You'll have to build the module yourself if you want to use it, but if you're encountering errors there's not much I can do, since I'm rarely working with Titanium these days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a major update that changes most of the internals to use the Firebase SDK. Upgrading to this version requires migrating your GCM project to Firebase, among other things. See the updated README and documentation for all the details.
Addresses issue #50