j2emanue
j2emanue

Reputation: 62519

google-services.json file - do i have to update it after adding google analytics?

Im not sure how to use the google-services.json file. There is already a file in my project for a few months now. It looks like this:

        {
  "project_info": {
    "project_number": "212111118",
    "project_id": "firebase-myapp"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:222222508:android:111118473",
        "android_client_info": {
          "package_name": "com.mypackage.myapp"
        }
      },
      "oauth_client": [],
      "api_key": [
        {
          "current_key": "abcd1234werwerwersdfdJXo"
        }
      ],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "ads_service": {
          "status": 1
        }
      }
    }
  ],
  "configuration_version": "1"
}

Now i put analytics all over my code in andriod. I am using google analytics. Do i need to update this file ? if so how ? Someone in the company gave me a few tracker Ids but no update to the json file. Should it need to be updated ?

Also what i have done is created two build variant folders. One for debug and one for release. there just folders under the src folder. In there i have put strings for the trackings (rollup and mobile tracking) both for debug and release. so do i need google-services.json files for both these folders now ?

Upvotes: 1

Views: 3637

Answers (1)

shuabing
shuabing

Reputation: 691

If you know the google-services.json generated!Add different service the file is different.It will help you. Debug and release just need one file.

Some google servies only when the apk release in google play store then they work fine!

Configure your application with google services (In your case your application already have configured the information just open the page, login with configure google account then select your appliciton) link to open the page

enter image description here

Upvotes: 1

Related Questions