Android (FCM) Push Notification Tutorial
This tutorial covers how to create a new Android app and integrate the push notification feature with FCM (Firebase Cloud Messaging).
By completing this tutorial, you will be able to make necessary configurations for using the push notification feature. We also present some implementation tips at the end of the tutorial to give you some hints to expand your application.
This tutorial covers the FCM-based push. If you want to use the JPush-based push, the feature available in China, see Android (JPush) Push Notification Tutorial instead.
When you add the FCM-based push into your mobile app, Kii Cloud uses the API symbol names for GCM and you configure FCM in the GCM section of the developer portal. The Kii Cloud SDK and server process interaction with GCM and FCM in the same way while the mobile app uses APIs of different libraries for GCM and FCM.
Prerequisite
Prior to going through this tutorial, you need some basic preparations for starting the Android application development.
Setting up the development tools
Install Android Studio. Also, install other Android development tools as needed.
The version of Android Studio needs to match the version required by the Firebase documentation. Version 1.5 or later is required at the time of creating this tutorial.
Registering as an Android developer
Register as an Android developer and have the privilege to create a new project and change the configurations on the Firebase console.
The implementation presented in this tutorial was created for Kii Cloud based on the sample code for FCM and GCM. Access GitHub to see the original code for FCM and GCM. Google distributed the sample code for both services under Apache license 2.0.
Let us move to the first step: Create an Android Application.