Parse Push Notifications Android Example/Tutorial using

Please follow and like us:

Android Push Notification using parse

Parse Push Notifications Android Example/Tutorial using

Try latest Android Push Notification tutorial using Firebase Cloud Messaging (FCM)’s android push notifications tutorial gives very easy and simplest example for integrating android push notifications using use google’s CGM(Google Cloud messaging) service so we will get push very fast. Just do following few steps and your app will ready with android push notifications example. Best part’s android push feature we don’t worry about backend process, it will be taken care by

NOTE: if you are thinking to add Push Notification using with fresh account then you can’t create new account in but if you have account already then you can implement it through this tutorial otherwise you can try our new tutorial for sending Push Notification using GCM, PHP and MySQL. part 1 for Server side configuration and part 2 for Android side logic for sending Push Notification.

Get GCM(Google Cloud Messaging) sender id for Parse Push Notifications using

  • Login to Google API console using Gmail id.
  • On “API Project” dropdown, select “create a project…” option.
  • Add your Project name and create project
  • Enable Cloud messaging for android API from APIs (API & auth menu).
  • Create new server key from credential (API & auth menu)
  • Click On Home tab, you will get your project’s project number.

Server key and project number will use in our app

Get application id and client key from for Parse Push Notifications using

  • Login/Signup to
  • Create New App
  • Click App’s Setting -> Push menu
  • Add API Key and Sender Id which we have generate in google API console in “GCM Push Credentials”
  • Click App’s Setting -> Keys menu
  • Copy Application Id and Client key

add Application Id,Client key and project number in strings.xml file

Integrate Android Push Notifications using with simple steps.

AndroidMainifest.xml file for android push notifications using will look like

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="" package="">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="" />

    <!--Change with your package name-->
    <permission android:name="" android:protectionLevel="signature" />
    <!--Change with your package name-->
    <uses-permission android:name="" />
    <application android:name=".app.MyApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme">
        <activity android:name=".SplashActivity" android:label="@string/app_name">
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
        <activity android:name=".MainActivity" android:label="@string/title_activity_main"></activity>

        <service android:name="com.parse.PushService" />

        <receiver android:name="com.parse.ParseBroadcastReceiver">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.USER_PRESENT" />
        <receiver android:name="com.parse.GcmBroadcastReceiver" android:permission="">
                <action android:name="" />
                <action android:name="" />

                <!--Change with your package name-->
                <category android:name="" />
        <receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported="false">
                <action android:name="com.parse.push.intent.RECEIVE" />
                <action android:name="com.parse.push.intent.DELETE" />
                <action android:name="com.parse.push.intent.OPEN" />

        <!-- add project number of google console project-->
        <meta-data android:name="com.parse.push.gcm_sender_id" android:value="@string/sender_id" />

        <!-- replace icon with your push icon identifier -->
        <meta-data android:name="com.parse.push.notification_icon" android:resource="@mipmap/ic_launcher" />



style.xml for android push notifications demo will look like 

<?xml version="1.0" encoding="utf-8"?>

<style name="AppTheme" parent="AppTheme.Base">


<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">

        <item name="colorPrimary">@color/primaryColor</item>
        <item name="colorPrimaryDark">@color/primaryColorDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:textColorPrimary">@color/colorTextPrimary</item>
        <item name="android:textColorSecondary">@color/colorTextSecondary</item>



color.xml for android push notifications example will look like

<?xml version="1.0" encoding="utf-8"?>

<color name="primaryColor">#2196F3</color>
<color name="primaryColorDark">#1976D2</color>
<color name="colorAccent">#FF4081</color>
<color name="colorTextPrimary">#212121</color>
<color name="colorTextSecondary">#727272</color>

strings.xml for push notifications using will be looks like

    <string name="app_name">Android Push Notification using</string>

    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="title_activity_main">MainActivity</string>

    <!-- keys-->
    <string name="applicationid" >app id</string>
    <string name="clientkey" >client id</string>

    <!-- GCM Sender ID -->
    <string name="sender_id" >id:project number</string>
</resources> contains initialization for Parse Push Notifications tutorial using


import android.util.Log;

import com.parse.Parse;
import com.parse.ParseException;
import com.parse.ParsePush;
import com.parse.SaveCallback;

public class MyApplication extends Application {

    private static MyApplication sInstance;

     * @return ApplicationController singleton instance
    public static synchronized MyApplication getInstance() {
        return sInstance;

    public void onCreate() {

        Parse.initialize(this, getResources().getString(R.string.applicationid), getResources().getString(R.string.clientkey));

        ParsePush.subscribeInBackground("", new SaveCallback() {
            public void done(ParseException e) {
                if (e == null) {

                    Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
                } else {
                    Log.e("com.parse.push", "failed to subscribe for push", e);

        // initialize the singleton
        sInstance = this;



Hope you liked our simple Parse Push Notifications Example using, if you found any difficulty during integrating android push notification example using push notification then let me know via comments below.

Download complete example of Parse Push Notifications Tutorial using

nirav kalola