How to add Push Notifications to your Android App


As all we know that Parse is shutdown we need move to another backend website for Android Push Notifications. One such alternative is also allow you to send Images as notifications and also give you clear statistics about your notifications. And Implementing Push notifications in Android App is a cake Job.

Prerequisites for Implementing Push Notifications in Your Android App.

  1. Android Studio Project
  2. GCM Project ID and Server Api Key ( Watch This Video to know how get GCM Credentials )
  3. Account (Signup Here Its free)

Watch below video for good understanding.



Procedure Include 2 Parts 1. Android Side 2. video)

  1. Android Side
  • Open your Android Studio project in which you want to add push Notifications.
  • In project structure go to app and open build.gradle and add below lines in your dependencies
  • Then add below lines to you defaultconfig in build.gradle below the versionName.
  • Now replace OneSignal App ID  in above code with One Signal App ID (Watch video above to know how to get ID)
  • Also replace GCM Project ID with you ID (Watch This Video to know how get GCM Project ID)
  • Then Open Your Main  and add below lines of  under onCreate method below super.onCreate();
  • Then add below method to your file
  • Then rebuild the Project and make sure it rebuilds the project without any errors.



Please enter your comment!
Please enter your name here