【发布时间】:2017-05-25 09:36:22
【问题描述】:
我正在制作一个项目,我想在其中集成不同的 FCM google-service.json,如何在同一个文件中集成不同的项目密钥我尝试了 2 个类似但不工作的项目,我们需要添加在我们的项目中。
{
"project_info": {
"project_number": "60554696754247",
"firebase_url": "https://project-1fca7.firebaseio.com",
"project_id": "project-1fca7",
"storage_bucket": "project-1fca7.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "xxxxxxxxxxxxx",
"android_client_info": {
"package_name": "com.company.project1"
}
},
"oauth_client": [
{
"client_id": "xxxxxxxxxxxxxxxx",
"client_type": 3
}
],
"api_key": [
{
"current_key": ""
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"project_info": {
"project_number": "13052496681",
"firebase_url": "https://project-2ebf8.firebaseio.com",
"project_id": "project-2ebf8",
"storage_bucket": "project-2ebf8.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "xxxxxxxxxxxxxxx",
"android_client_info": {
"package_name": "com.company.project2"
}
},
"oauth_client": [
{
"client_id": "xxxxxxxxxxxxxx",
"client_type": 3
}
],
"api_key": [
{
"current_key": "xxxxxxxxxxxxxxxx"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
【问题讨论】:
-
一般来说,强烈不建议修改 google-services.json 文件。你为什么要这样做?
标签: json firebase firebase-cloud-messaging google-play-services