Skip to content

Push Notifications Android

To enable push notification you will need to integrate Google Firebase in your app:

1. If you don't already have a Firebase project, create one at Google Firebase Console.
Inside the project, select "Add Firebase to your Android app" (make sure to enter the right package name of your app).

2. Download google-services.json file to your computer and add the file in your Android component.
google-services.json

Select properties on that file and specify the following “Build Action>GoogleServicesJson”. If that Build Action is not available simply close and re-open the solution. google-services-help

3. Copy your project FCM Cloud Messaging Server Key from Google Firebase Console (See the screenshot below and make sure to use the right api key) fcmkey


4. Open NearIT web interface, select your app and navigate to “Settings > Push Settings”. Paste your project FCM Key under the “Setup Android push notifications” block. nearitsettings

The SDK creates a system notification for every push recipe it receives. On the notification tap, your launcher activity will start.