---
agentTools:
  projectIndex: https://docs.nvecta.com/llms.txt
---

# Push Notifications

## Configure build.gradle

If have done FCM integration. These steps may exist in build.gradle files. So you can skip these steps.

Add the below code in build.gradle (**module-level**) at the bottom. If you don't have.

```java
apply plugin: 'com.google.gms.google-services'
```

Add the below code in build.gradle (**project-level**). If you don't have.

```java
buildscript {
  dependencies {
   	 // Add this line
    	classpath 'com.google.gms:google-services:4.0.1'
  }
}
```

## Configure FCM's Sender ID and Private Key

Select the '**Cloud Messaging**' tab to find out the '**SENDER ID**' for FCM.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/e17de21-d105234-Up_Now_3.png",
        "IMAGE 16.png",
        1347
      ],
      "align": "center",
      "border": true
    }
  ]
}
[/block]

Select the '**Service Accounts**' tab to generate '**PRIVATE KEY**' for FCM.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/495be9a-2.png",
        "",
        ""
      ],
      "align": "center",
      "border": true
    }
  ]
}
[/block]

Click on the '**Generate new private key**' button. This will download a **JSON** file. Refer below for sample **JSON** file format.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/dd223ee-3.png",
        "",
        ""
      ],
      "align": "center",
      "border": true
    }
  ]
}
[/block]

Store this **JSON** file on your system.

Login to your NotifyVisitors Account.

Navigate to **Settings** > **App Push** > **Android** tab.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/d4b2207-Up_Now_GIF_2.gif",
        "",
        ""
      ],
      "align": "center",
      "border": true
    }
  ]
}
[/block]

Upload your downloaded private key **JSON** file in the '**Upload Auth File**' section.

Add '**Sender ID**' from your '**Cloud Messaging**' section.

Add '**App ID** (**project ID**)' from your downloaded private key **JSON** file.

Save the changes i.e., click on the button titled '**Save Changes**'.

## Push Notification Icon

Create a **monochrome png** icon and the size must be 200×200.  The name of the icon should be **sm\_push\_logo.png** Paste into **your-project/android/app/src/main/res/drawable/**.