Skip to content

Instantly share code, notes, and snippets.

@n1lesh
Created December 18, 2017 08:30
Show Gist options
  • Save n1lesh/eab8f52cbad7f586c2ff6adb5a3fc40e to your computer and use it in GitHub Desktop.
Save n1lesh/eab8f52cbad7f586c2ff6adb5a3fc40e to your computer and use it in GitHub Desktop.
Sample Code for Push Notifications (FCM) on Android - Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mynotificationsapp.android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".MessageReceiver">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".InstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment