Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27745] Android: Add "google-services.json" support for Firebase

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-04-15T18:07:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.1
ComponentsAndroid
Labelsandroid, build, json
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-04T04:38:42.000+0000
Updated2020-04-15T18:07:16.000+0000

Description

*Summary:* Google documents that you should configure your app for Firebase via a "google-services.json" file. Titanium does not currently support this JSON file and requires app developers to call Google's Java APIs to configure the app for Firebase instead. Add JSON file support will make this much simpler and would follow their docs. *Note:* Google documents how to set this up here... https://firebase.google.com/docs/android/setup *Recommended Solution:* The file should be added to the following Titanium project folder...
./platform/android/google-services.json
If the file is found, we need to copy it to the following build folder location...
./build/android/app
We'll need to add the following to the [root.build.gradle](https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/root.build.gradle) file.
buildscript {
	dependencies {
		classpath 'com.google.gms:google-services:4.3.3'
	}
}
We'll need to add the following to the [app.build.gradle](https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/app.build.gradle) file.
apply plugin: 'com.google.gms.google-services'

Comments

  1. Hans Knöchel 2020-02-04

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11461
  2. Joshua Quick 2020-03-03

    PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11514
  3. Satyam Sekhri 2020-04-15

    FR Passed.
  4. Satyam Sekhri 2020-04-15

    Verified on: Mac OS: 10.15.4 SDK: 9.0.1.v20200415071927, 9.1.0.v20200415075143 Appc CLI: 8.0.0 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202003181504 Device: Pixel3(v10.0) emulator

JSON Source