-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to Firebase SDK #66
base: master
Are you sure you want to change the base?
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
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 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