orium
orium

Reputation: 3813

How firebase cloud messaging initialized in android app

After adding fcm to my project I am wondering: how does it works?
I mean - there is no any firebase integration code in my app. I just have followed setup guide, added dependency and plugin in build.gradle.
How does firebase code get called? Is it use some kind of intent filter?

Upvotes: 2

Views: 2126

Answers (1)

Diego Giorgini
Diego Giorgini

Reputation: 12717

The technique used to initialize the Firebase SDK is explained here: 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.

Upvotes: 2

Related Questions