问题
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