添加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/