Skip to content

SanketKachhela/FirebaseDemo

 
 

Repository files navigation

FirebaseDemo

Firebase Cloud Notification

  1. Add rules to your root-level build.gradle file, to include the google-services plugin:
buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}
  1. Add the FCM dependency to your app-level build.gradle file:
dependencies {
     compile 'com.google.firebase:firebase-messaging:9.2.1'
}

and add google-services module at the end of you app-level build.gradle

apply plugin: 'com.google.gms.google-services'
  1. Add this 2 service in your meanfieast.xml
<service
    android:name=".MyFirebaseMessagingService">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT"/>
    </intent-filter>
</service>

  <service
    android:name=".MyFirebaseInstanceIDService">
    <intent-filter>
        <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
    </intent-filter>
  </service>
  1. At the end, you'll download a google-services.json file. You can download this file again at any time from this link https://support.google.com/firebase/answer/7015592 .

You can check notification using this testing environment.

About

Firebase Cloud Notification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%