hansemannn / titanium-firebase-core

Use the Firebase Core SDK in the Titanium SDK 🚀
Other
31 stars 23 forks source link

Improvement: reading configuration from google-services.json #11

Closed AppWerft closed 6 years ago

AppWerft commented 6 years ago

Here is the code: https://github.com/AppWerft/Ti.Firebase/blob/master/android/src/ti/firebase/FirebaseModule.java

hansemannn commented 6 years ago

Feel free to submit a PR and test-case for this!

m1ga commented 6 years ago

I have a working PR for this. It will use the file parameter like the iOS version. It will read the given filename out of the /app/assets/android/ folder: fc.configure({file: "gs.json"}); will import /app/assets/android/gs.json

Which firebase version should I use? I've tested it with 11.0.4 since FCM is still using this and ti.playservices

hansemannn commented 6 years ago

Yep, 11.0.4 would be great! Let me know and I'll review the change.

m1ga commented 6 years ago

https://github.com/hansemannn/titanium-firebase-core/pull/16 Ready to test. I've kept the debug-log to show the actual parameters when you set them by hand or pass the file parameter. Might be handy when you debug

hansemannn commented 6 years ago

Thanks @m1ga !