android 应用程序中如何初始化 firebase 云消息传递

How firebase cloud messaging initialized in android app

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

这里解释了用于初始化 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.