android - Firebase 云消息传递如何在 Android 应用程序中初始化

标签 android firebase firebase-cloud-messaging

添加fcm后对于我的项目,我想知道:它是如何工作的?
我的意思是 - 我的应用程序中没有任何 firebase 集成代码。我只是遵循了设置指南,在 build.gradle 中添加了依赖项和插件。
firebase代码如何被调用?它使用某种 Intent 过滤器吗?

最佳答案

此处解释了用于初始化 Firebase SDK 的技术: https://firebase.googleblog.com/2016/12/how-does-firebase-initialize-on-android.html

There is a little trick that the Firebase SDKs for Android use to install a hook early in the process of an application launch cycle. It introduces a ContentProvider to implement both the timing and Context needed to initialize an SDK, but without requiring the app developer to write any code.

关于android - Firebase 云消息传递如何在 Android 应用程序中初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37699490/

相关文章:

android - ScrollView 的滚动有监听器吗?

Android EditText 下一个重点

amazon-web-services - Parse、Firebase 和 AWS Cognito 哪个更适合用户?

firebase - Firestore 查询 : How to filter on document id?

android - Notification Messaging Style 消息存储位置

android - 无法在 Android 中使用正确的 key 验证 Mifare 卡中的扇区

android - Android下如何使用Akka项目

firebase - 如何从 firebase auth 获取用户 ID 作为字符串?

android - 在没有应用程序的情况下测试 firebase 云消息传递

android - Android 设备上未显示 Firebase 通知