【发布时间】:2015-06-10 10:06:46
【问题描述】:
在为我的 Android 应用程序实现 GCM 时,我不得不多次创建配置文件 (see here)。因为我这样做了,您选择添加的服务被多次“添加”,所以我的配置文件现在比必要的长得多,因为服务重复了多次。有谁知道如何从我的应用程序中“删除”服务?我现在只想启用 GCM。显然我可以从 json 中删除它,但这对后端没有任何作用。我确定它在 Google Dev Console 中,但似乎找不到。谢谢!
或者,这是否是 GCM 配置文件的正确布局?我不这么认为,因为我做了演示应用程序,它有一个长度约为 500 个字符的配置文件,而我的开始长度大约是这个长度,每次我创建一个新长度时,它都会变得越来越长,现在有 1712 个字符。
配置文件:
{
"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
}
}
}
]
}
【问题讨论】:
标签: android file configuration google-cloud-messaging