Google-services.json : What goes in the 'api_key' section to enable Firebase push notifications?

断了今生、忘了曾经 提交于 2019-12-19 11:57:13

问题


I want to enable Firebase Cloud Messaging for push notifications for my Android app. In the google-services.json file needed for push notifications there's a field called "api_key".

Right now I have "api_key": [{ "current_key": "" }]

Should I put the Web API Key I see on my Firebase Console?


回答1:


The api_key value in google-services.json is not used by FCM.
(it is used by other Firebase libraries)

Generally speaking do not touch the google-services.json that is provided by the Firebase Console. Just download it and add it to your app as is.




回答2:


Get a new google-services.json file from the Firebase Console. There you can find the right api_key for your app.



来源:https://stackoverflow.com/questions/40335208/google-services-json-what-goes-in-the-api-key-section-to-enable-firebase-pus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!