admin管理员组文章数量:1431927
At my company we are trying to restrict our Google API keys (the ones Firebase creates for you) to the minimum required to handle our FCM notifications. We only use direct to device notifications, no topics of any kind. In small scale test this seems to only have required the Firebase Installations API.
This allows us to retrieve a token for the device from the API Call:
val firebaseMessaging = FirebaseMessaging.getInstance()
firebaseMessaging.token
This token alone lets us send a FCM notification from our server-side solution.
The imports in our Android app are:
com.google.firebase.messaging.FirebaseMessaging
com.google.firebase.messaging.RemoteMessage
com.google.firebase.messaging.FirebaseMessagingService
with a dependency on:
com.google.firebase:firebase-messaging:23.1.2
Is there anything I am missing here or other APIs that we should be including? Any help would be appreciated. I am limited to how much source code I can share.
本文标签: firebaseMinimum APIs for Android Application to receive FCM notificationsStack Overflow
版权声明:本文标题:firebase - Minimum APIs for Android Application to receive FCM notifications - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745590870a2665188.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论