Last updated
Last updated
Add configuration file Create a project via the Firebase console, and download the google-services.json and move it into the app's modules (app level) directory
Apply gradle plugin a、If your project doesn't have dependencyResolutionManagement in your settings.gradle, add the following to your top-level build.gradle at the end of repositories:
top-level build.gradle
Otherwise add the following to your settings.gradle in repositories of dependencyResolutionManagement section:
settings.gradle
b、 add the following to your top-level build.gradle
top-level build.gradle
c、In your module (app-level) Gradle file (usually app/build.gradle), apply the Google Services Gradle plugin:
app-level build.gradle
notification message To get push messages, you have to call method:
Example
API Reference
onNewToken(token: String)
When the Firebase token is updated, it will be called back through this method
onMessageReceived(remoteMessage: RemoteMessage)
Push notification message callback (when the App is in the foreground, the push notification will be called back)
The part of SDK needed to connect with your users through push-notifications