In this tutorial, I will show you how to implement push notifications in your native app for android.
Download the required software packages.
- Download and install Android Studio and Android SDK.
- Android Studio + SDK – http://developer.android.com/sdk/index.html.
Setting up your development environment
Open your Android Studio and choose Start a new Android Studio project.
Enter your custom Application name, Company Domain and select Project location. Click Next.
Select Phone and Tablet. Make sure API 15 selected. Click Next.
Select Blank Activity and click Next.
Now we need to get project id from google cloud. Go to https://console.developers.google.com and create a new project. Click Create Project button and a popup will appear. Enter your project name and click Create. Mine is Native Push.
Then you will be direct to this page. Copy out your project number on the top. Click Enable API. Enable Google Cloud Messaging for Android. Click Credentials under APIs and auth on left sidebar.
Go to Credentials page. It’s under APIs & auth > Credentials.
Choose Server key.
Enter your custom Name and click Create.
Below is API key details for your project. Copy your API key.