Skip to content

Instantly share code, notes, and snippets.

@Sunilkumarr
Last active August 3, 2020 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sunilkumarr/eb1548010ed920cc97d9ee4ec145aa54 to your computer and use it in GitHub Desktop.
Save Sunilkumarr/eb1548010ed920cc97d9ee4ec145aa54 to your computer and use it in GitHub Desktop.
Push notification for react native android applozic v5.5.6
1.Add the MyFCMService.java attached file in your project by download that and drag and drop in your android project under package app> main> java >in your packge folder
NOTE: make sure that the MyFCMService.java as your package name in place of package com.myapp.pushnotification;
2.Addd this in your android manifest file
in RNFirebaseMessagingService.java
<service
android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService"
android:exported="false"
tools:node="remove">
</service>
<!--IF the MyFCMService exist in same package which is defined in package of this xml <manifest element else it will be package of the file -->
<service
android:name=".MyFCMService"
android:exported="false"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment