Deleting Repeated Services from Android GCM Config File

493 views Asked by At

In my implementation of GCM for my Android App, I had to create a configuration file multiple times (see here). Because I did this, the services you choose to add got "added" multiple times, so my config file is now much longer than necessary, because the services are repeated multiple times. Does anyone know how to "delete" the services from my app? I essentially just want GCM enabled for now. Obviously I could just delete it from the json but that doesn't do anything on the backend of things. I'm sure it's in the Google Dev Console, but can't seem to find it. Thanks!

Or maybe, is this the correct layout for a config file for GCM? I don't think so, because I did the Demo App and it had a config file of length ~500 characters, while mine began around that length and each time I created a new one it got longer and longer, and now sits at 1712 characters.

Configuration File:

{  
   "project_info":{  
      "project_id":"project-id",
      "project_number":"96363846xxxx",
      "name":"ProjectName"
   },
   "client":[  
      {  
         "client_info":{  
            "client_id":"android:xxx.xxx",
            "client_type":1,
            "android_client_info":{  
               "package_name":"package.name"
            }
         },
         "oauth_client":[  

         ],
         "services":{  
            "analytics_service":{  
               "status":1
            },
            "cloud_messaging_service":{  
               "status":1,
               "apns_config":[  

               ]
            },
            "appinvite_service":{  
               "status":1,
               "other_platform_oauth_client":[  

               ]
            },
            "google_signin_service":{  
               "status":1
            },
            "ads_service":{  
               "status":1
            }
         }
      },
      {  
         "client_info":{  
            "client_id":"android:xxx.xxx",
            "client_type":1,
            "android_client_info":{  
               "package_name":"package.name"
            }
         },
         "oauth_client":[  

         ],
         "services":{  
            "analytics_service":{  
               "status":1
            },
            "cloud_messaging_service":{  
               "status":2,
               "apns_config":[  

               ]
            },
            "appinvite_service":{  
               "status":1,
               "other_platform_oauth_client":[  

               ]
            },
            "google_signin_service":{  
               "status":1
            },
            "ads_service":{  
               "status":1
            }
         }
      },
      {  
         "client_info":{  
            "client_id":"android:xxx.xxx",
            "client_type":1,
            "android_client_info":{  
               "package_name":"package.name"
            }
         },
         "oauth_client":[  

         ],
         "services":{  
            "analytics_service":{  
               "status":1
            },
            "cloud_messaging_service":{  
               "status":2,
               "apns_config":[  

               ]
            },
            "appinvite_service":{  
               "status":1,
               "other_platform_oauth_client":[  

               ]
            },
            "google_signin_service":{  
               "status":1
            },
            "ads_service":{  
               "status":1
            }
         }
      },
      {  
         "client_info":{  
            "client_id":"android:xxx.xxx",
            "client_type":1,
            "android_client_info":{  
               "package_name":"package.name"
            }
         },
         "oauth_client":[  

         ],
         "services":{  
            "analytics_service":{  
               "status":1
            },
            "cloud_messaging_service":{  
               "status":2,
               "apns_config":[  

               ]
            },
            "appinvite_service":{  
               "status":1,
               "other_platform_oauth_client":[  

               ]
            },
            "google_signin_service":{  
               "status":1
            },
            "ads_service":{  
               "status":1
            }
         }
      }
   ]
}
1

There are 1 answers

1
Kay_N On

Go to Developers Console.
Go to respective project.
Click on APIs & Auth >> APIs >> You will see "Enabled APIs" tab on top >> Disable.

This will stop calls to the APIs you do not wish to call at this time. When you need them you can enable them again from the console.

Hope this helps!