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

# Push Notifications

Configure push notifications using NotifyVisitors.

[block:html]
{
  "html": "<div style=\"margin-top: -15pt !important;\">\n  <ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">Android Push Notifications are one of the most engaging tools when it comes to marketing automation, since they are concise yet captivating pop-up messages that Android displays outside of an app's UI to provide users with time-sensitive information, reminders, intimations from other people and thereby encourage the receivers to take specific actions such as view an online catalogue of products, purchase new goods and services, RSVP to events etc.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">Such communications are used by brands worldwide to dispatch personalized messages and timely convey relevant information to their clients. Users can tap the notification to open a brand’s app or take actions directly from within the notification itself.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">So, they’re incorporated by various brands and almost all types of apps such as health apps, to remind subscribers to timely consume their medicine; sports apps, to notify users whenever their favourite team scores; or banking apps, to request approval for a particular transaction. This way, they add value to the app and keep users engaged.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">In a nutshell, android push notifications are essentially a part of a brand’s overall marketing endeavours of delivering strategically timed, targeted messages to its customer base so as to drive more conversions by way of user engagement, enhance consumer retention and build healthy relationships or long-lasting connections with the audience.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">Click <a href=\"https://support.notifyvisitors.com/support/solutions/articles/84000384640-how-to-create-an-android-push-notifications-campaign\">here</a> to learn more about <b style=\"font-weight: 500 !important;\">Android Push Notifications</b>.</span></li>\n</ol>\n</div>"
}
[/block]

## 1. Configure in NotifyVisitors Panel

**a**) Go to [**FCM**](https://console.firebase.google.com/) and register your app.

**b**) Copy **Sender Id** and **Server key** from FCM.

**c**) Go to NotifyVisitors panel and from mobile push menu go to **Android** section inside **configuration section** from left side menu panel and Paste **Sender Id** and **Server key** there.

## 2. Configure in App

### Follow the undermentioned steps, in case you don't have your own Firebase Integration:

**a**) Download the latest **config json** file (**google-service.json file**) and paste it into your app folder in IDE.

**b**) Add a Google Services plugin as a dependency in your project-level build.gradle file.

```groovy Groovy [ build.gradle ]
plugins {
   id 'com.google.gms.google-services' version '4.4.0' apply false
}
```
```kotlin Kotlin [ build.gradle.kts ]
plugins {
   id("com.google.gms.google-services") version "4.4.0" apply false
}
```

**c**) Add a Google Services plugin in your module-level build.gradle file.

```groovy Groovy [ build.gradle ]
plugins {
   id 'com.google.gms.google-services'
}
```
```kotlin Kotlin [ build.gradle.kts ]
plugins {
   id("com.google.gms.google-services") 
}
```

**d**) Add the dependency for Firebase Cloud Messaging in your module-level build.gradle file.

```groovy Groovy [ build.gradle ]
dependencies {
  implementation platform('com.google.firebase:firebase-bom:30.3.1')
  implementation ('com.google.firebase:firebase-messaging')
}
```

**e**) Add the below NotifyVisitors service for Firebase Messaging Service in the app module’s manifest file.

```xml
<service
   android:exported="false"
   android:name="com.notifyvisitors.notifyvisitors.NVFirebaseMessagingService"
   android:permission="${applicationId}.notifyvisitors.custom.PERMISSION">
   <intent-filter>
       <action android:name="com.google.firebase.MESSAGING_EVENT" />
   </intent-filter>
</service>
```

### Perform the below function in case you have your own firebase integration:

```java
try {
   if (intent.hasExtra("nv_source")) {
       String value = intent.getExtras().getString("nv_source");
       if (value.equals("1")) {
           if(NotifyVisitorsApi.getInstance(this).isPayloadFromNvPlatform(remoteMessage.toIntent())) {
                  NotifyVisitorsApi.getInstance(this).getNV_FCMPayload(remoteMessage.toIntent());
           }
       }
   }
} catch (Exception e) {
   e.printStackTrace();
}
```
```kotlin
try {
    if (intent.hasExtra("nv_source")) {
       val value = intent.extras!!.getString("nv_source")
       if (value == "1") {
             if (NotifyVisitorsApi.getInstance(this).isPayloadFromNvPlatform(remoteMessage.toIntent())) {
                   NotifyVisitorsApi.getInstance(this).getNV_FCMPayload(remoteMessage.toIntent())
             }
       }
    }
} catch (e: Exception) {
    e.printStackTrace()
}
```

## 3. Configure Icons -- IMPORTANT

[block:html]
{
  "html": "<div style=\"margin-bottom: 19pt !important;\"></div>"
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "",
    "h-1": "",
    "0-0": "**For below Lollipop devices**",
    "0-1": "**For Lollipop & above devices**",
    "1-0": "Devices below Lollipop show only one icon in the push notifications, which you can configure from the notifyvisitors panel.  \n  \nTo change the default notification icon, replace icon sm_push.png in your app’s module app/src/main/res/drawable folder.",
    "1-1": "Devices supporting Lollipop & above show two notification icons i.e., small push icon & large push icon.  \n  \n**Large push icon**: It is configured from the panel & is shown as the main push icon. However, if a large push icon is not configured from the panel then a small push icon is shown as the main push icon.  \n  \n**Small push icon**: It will be set according to Android documentation (<https://developer.android.com/about/versions/android-5.0-changes.html>). It should be transparent, otherwise, it will be shown as a square white spot."
  },
  "cols": 2,
  "rows": 2,
  "align": [
    "left",
    "left"
  ]
}
[/block]

[block:html]
{
  "html": "<div style=\"margin-bottom: 24.2pt !important;\"></div>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/5133ba6-Combined.png",
        "",
        ""
      ],
      "align": "center"
    }
  ]
}
[/block]

[block:html]
{
  "html": "<div style=\"margin-bottom: 22.8pt !important;\"></div>"
}
[/block]

### Small Icon

Small icon density and size.

[block:html]
{
  "html": "<table class=\"fr-dashed-borders\" style=\"width: 100%; margin-right: calc(0%); margin-top: 17pt !important;\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td dir=\"ltr\" style=\"width: 19.9861%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\"><span style=\"font-size: 13px;\"><strong dir=\"ltr\">Density (dp)</strong></span></div>\n\t\t\t</td>\n\t\t\t<td style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\"><span style=\"font-size: 13px;\"><strong dir=\"ltr\">Size (px)</strong></span></div>\n\t\t\t</td>\n\t\t\t<td dir=\"ltr\" style=\"width: 59.5861%;\">\n\t\t\t\t<div style=\"text-align: center;\"><span style=\"font-size: 13px;\"><strong dir=\"ltr\">File Path (in Project)</strong></span></div>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"width: 19.9861%; text-align: center;\">\n\n\t\t\t\t<p dir=\"ltr\" style=\"text-align: center;\">MDPI</p>\n\t\t\t</td>\n\t\t\t<td dir=\"ltr\" style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\">24 x 24</div>\n\t\t\t</td>\n\t\t\t<td dir=\"ltr\" style=\"width: 59.5861%; text-align: center;\">\n\t\t\t\t<div style=\"text-align: center;\"><strong dir=\"ltr\"><span dir=\"ltr\" style=\"font-size: 14px;\"><span dir=\"ltr\" style=\"font-size: 10pt; font-family: Arial, sans-serif; font-weight: 400;\">res/drawable-mdpi/sm_push_logo.png</span></span></strong></div>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"width: 19.9861%; text-align: center;\">\n\n\t\t\t\t<p dir=\"ltr\" style=\"text-align: center;\">HDPI</p>\n\t\t\t</td>\n\t\t\t<td dir=\"ltr\" style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\">36 x 36</div>\n\t\t\t</td>\n\t\t\t<td dir=\"ltr\" style=\"width: 59.5861%; text-align: center;\"><span dir=\"ltr\" style=\"font-size: 10pt; font-family: Arial, sans-serif; font-weight: 400;\">res/drawable-hdpi/sm_push_logo.png</span>\n\t\t\t\t<br>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"width: 19.9861%; text-align: center;\">\n\n\t\t\t\t<p dir=\"ltr\" style=\"text-align: center;\">XHDPI</p>\n\t\t\t</td>\n\t\t\t<td style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\">48 x 48</div>\n\t\t\t</td>\n\t\t\t<td style=\"width: 59.5861%; text-align: center;\"><span dir=\"ltr\" style=\"font-size: 10pt; font-family: Arial, sans-serif; font-weight: 400;\">res/drawable-xhdpi/sm_push_logo.png</span>\n\t\t\t\t<br>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"width: 19.9861%; text-align: center;\">\n\n\t\t\t\t<p dir=\"ltr\" style=\"text-align: center;\">XXHDPI</p>\n\t\t\t</td>\n\t\t\t<td style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\">72 x 72</div>\n\t\t\t</td>\n\t\t\t<td style=\"width: 59.5861%; text-align: center;\"><span dir=\"ltr\" style=\"font-size: 10pt; font-family: Arial, sans-serif; font-weight: 400;\">res/drawable-xxhdpi/sm_push_logo.png</span>\n\t\t\t\t<br>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td dir=\"ltr\" style=\"width: 19.9861%; text-align: center;\">XXXHDPI</td>\n\t\t\t<td style=\"width: 20.4039%;\">\n\t\t\t\t<div dir=\"ltr\" style=\"text-align: center;\">96 x 96</div>\n\t\t\t</td>\n\t\t\t<td style=\"width: 59.5861%; text-align: center;\"><span dir=\"ltr\" style=\"font-size: 10pt; font-family: Arial, sans-serif; font-weight: 400;\">res/drawable-xxxhdpi/sm_push_logo.png</span>\n\t\t\t\t<br>\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>"
}
[/block]

[block:html]
{
  "html": "<div style=\"margin-bottom: 22pt !important;\"></div>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/097d2a6-shadow_soft.png",
        "",
        ""
      ],
      "align": "center"
    }
  ]
}
[/block]

[block:html]
{
  "html": "<div style=\"margin-bottom: 24.5pt !important;\"></div>"
}
[/block]

> 📘 Note
>
> To change the default small push icon, add the icon as “sm\_push\_logo.png” in your app’s module app/src/main/res/drawable folder.

[block:html]
{
  "html": "<div style=\"margin-bottom: 20pt !important;\"></div>"
}
[/block]

Follow the undermentioned steps, to get a **small push icon effect** in your **status bar**,

**1**. Go to *[Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio/)*.

**2**. Select *Notification Icon Generator*.

**3**. Select Image under the Source menu (  Note\*\*:\*\* Here, select your Monochrome icon).

**4**. Copy and paste your small push icon there on.

**5**. Enter its name in the '**Name Menu**' on the left side ( Note: Name here will be as '**sm\_push\_logo**') .

**6**. Download the images from the top-right-corner icon. Download it as a zip file.

**7**. Unzip it and paste all folders in your app.

[block:html]
{
  "html": "<div style=\"margin-top: 20pt !important; margin-bottom: 15pt !important;\">\n\t<div style=\"border-radius: 0.33367187813671876em !important; border-left-color: #dcdcdc !important; border-top-color: #dcdcdc !important; border-right-color: #dcdcdc !important; border-bottom-color: #dcdcdc !important; border-style: solid; border-left-width: 2.4pt; padding-right: 20px; padding-bottom: 10.1466376pt; padding-top: 10.1466376pt; padding-left: 20px;\">\n\n\t\t<p style=\"line-height: 1.375; margin-bottom: 8.575342400000001pt !important; font-family: 'Urbanist', sans-serif !important; font-weight: 500 !important; font-size: 13.125pt !important; text-align: justify;\">Important</p>\n\n\t\t<p style=\"line-height: 17.1394768pt !important; margin-bottom: 8.0697384pt; font-family: Roboto, sans-serif; font-size: 11.7pt !important; text-align: justify;\">The notification small icon must be white on a transparent background as Android only uses the <b style=\"font-weight: 500 !important;\">alpha channel</b> for the icon.</p>\n\t</div></div>"
}
[/block]

### Small Icon Accent Color

Android 5.0+ enforces your small icon to only be white and transparent, however, it still allows tinting on the notification, known as the "**accent color**". (The status bar icon color will still be unaffected).

To set a default color, add the following line to your res/values/colors.xml file in your project.

```xml
<resources>
    <!-- It sets all NotifyVistors push notification's accent color to Dark Red by default.  -->
   <color name="push_small_icon_background">#a03844</color>
</resources>
```

Some device manufacturers display the image as it is (multi-colored image; ignoring the alpha channel rule).

We highly recommend following the alpha rule as the icons may not look consistent on all devices. Google designed it in this way, since the icon is too small to see any meaningful detail, so enforcing a single color helps enforce an easier-to-recognize icon at a glance.

### Large Icon

The large notification icon will show up to the left of the notification text on Android 4.0.3 - 6.0 devices and to the right for Android 7.0+ devices. If you do not set a large icon, the app icon will be used instead. The recommended size of the large icon is 200x200 pixels.

[block:html]
{
  "html": "<div style=\"margin-bottom: 21pt !important;\"></div>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/820f16a-shadow_soft_9.png",
        "",
        ""
      ],
      "align": "center",
      "sizing": "65% "
    }
  ]
}
[/block]

\[ **Android 6.0** ]

[block:html]
{
  "html": "<div style=\"margin-bottom: 22pt !important;\"></div>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/b395690-shadow_soft.png",
        "",
        ""
      ],
      "align": "center",
      "sizing": "65% "
    }
  ]
}
[/block]

\[ **Android 10.0** ]

[block:html]
{
  "html": "<div style=\"margin-bottom: 22pt !important;\"></div>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/9cf1322-shadow_soft.png",
        "",
        ""
      ],
      "align": "center",
      "sizing": "65% "
    }
  ]
}
[/block]

\[ **Android 13.0** ]

[block:html]
{
  "html": "<div style=\"margin-bottom: 22pt !important;\"></div>"
}
[/block]

## 4. Notification Preferences

Give a user the option to subscribe to a specific category of notifications, or to unsubscribe completely from push notifications.

First, you will need to define the categories in NotifyVisitors Panel. Click here to learn how and then you can implement the below code in your app.

```java Java
NotifyVisitorsApi.getInstance(activityContext).pushPreferences((preferenceList (JSONArray), isUnSubscribeFromAll (boolean));
```
```kotlin
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(preferenceList: JSONArray?, isUnSubscribeFromAll: Boolean)
```

Here the parameter "isUnSubscribeFromAll" is passed as a boolean. If you pass as FALSE, then it will work as a subscribing user according to the preferenceList passed. If you pass as TRUE, then it will work as unsubscribing user according to the preferenceList you passed.

Below are some cases with examples that will help you understand the scenarios of subscribing and unsubscribing.

### Case 1: Subscribe the user to all the three categories passed in the array.

```java Java
JSONArray jsonArray = new JSONArray();
jsonArray.put("category1");
jsonArray.put("category2");
jsonArray.put("category3");
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(jsonArray, false);

```
```kotlin
val jsonArray = JSONArray()
jsonArray.put("category1")
jsonArray.put("category2")
jsonArray.put("category3")
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(jsonArray, false)
```

### Case 2: Subscribe the user to all the categories by default.

```java Java
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(null, false);
```
```kotlin
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(null, false)
```

### Case 3: UnSubscribe the user to all the three categories passed in the array.

```java Java
JSONArray jsonArray = new JSONArray();
jsonArray.put("category1");
jsonArray.put("category2");
jsonArray.put("category3");
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(jsonArray, true);
```
```kotlin
val jsonArray = JSONArray()
jsonArray.put("category1")
jsonArray.put("category2")
jsonArray.put("category3")
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(jsonArray, true)
```

### Case 4: UnSubscribe the user from all the categories.

```java Java
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(null, true);
```
```kotlin
NotifyVisitorsApi.getInstance(activityContext).pushPreferences(null, true)
```

## 5. Callbacks Related to Push Notifications

Implement the callback method below if you want to receive any of the below callbacks in your app. This will provide you with a response in JSONObject format.

```java Java
NotifyVisitorsApi.getInstance(this).getEventResponse(new OnEventTrackListener() {
   @Override
   public void onResponse(JSONObject data) {
       //do your task here
   }
});
```
```kotlin
NotifyVisitorsApi.getInstance(activityContext).getEventResponse(object : OnEventTrackListener{
   override fun onResponse(data: JSONObject?) {
       //do your task here
   }
})
```

**I. Push Registered**

[block:html]
{
  "html": "<div style=\"margin-bottom: 8pt !important;\"></div>"
}
[/block]

This callback will be received whenever the user gets registered in our NotifyVisitors Dashboard. Below is the sample output which you will receive in the above callback for this case-

```json JSONObject
{
   "status":"success",
   "eventName":"Push_Registered",
   "attributes":{
      "subscriptionId":"e90RM4olWRU:APA91bGhn2dL38cpy2r7eMqqqgmctPwU9wvbomq9x1TaPO6u8aDZQoiRWu5oY3-bpPe5oBwVZkzDUK5llw1t2FNnbJ5B3fjjFyi2ojnVDRLqQIFcea6ury5_KCGpwB61iTyu0fQd2ha1"
   }
}
```

**II. Push Clicked**

[block:html]
{
  "html": "<div style=\"margin-bottom: 8pt !important;\"></div>"
}
[/block]

This callback will be received whenever the user clicks on push notification received from NotifyVisitors Dashboard. In this callback, you will also get all attributes associated with the click type of the push notification. Below is the sample output which you will receive in the above callback for this case:

```json JSONObject (when CTA is clicked)
{
   “status”:“success”,
   “eventName”:“Push_Clicked”,
   “message”:“Push clicked successfully.”,
   “type”:18.5,
   “attributes”:{
      “actionURL”:“https:\/\/www.notifyvisitors.com\”,
      “target”:1,
      “callToAction”:1,
      “action_params”:{
         “paramKeyOne”:3
      },
      “notification_id”:“203501”
   },
   “callbackType”:“push”
}
```

```json JSONObject (when Image is clicked)
{
   “status”:“success”,
   “eventName”:“Push_Clicked”,
   “message”:“Push clicked successfully.”,
   “type”:18.6,
   “attributes”:{
      “actionURL”:“com.tnpnv_.notifycodeapp.MainActivity”,
      “target”:0,
      “callToImageIndex”:2,
      “action_params”:{
         “paramKeyOne”:164906,
         “paramKeyTwo”:“img99",
         “paramKeyThree”:true
      },
      “notification_id”:“164906”
   },
   “callbackType”:“push”
}
```

**Values against parameters mentioned in the above responses are described below. These details are for the "*Push\_Clicked*" callback only.**\
status- success or fail (as String)\
eventName - Push\_Clicked (as String)\
message - Push clicked successfully (as String)\
type - 18.6 or other (as Double) used for SDK's internal purpose\
callbackType - push/inbox (as String), "inbox" appears only when push is clicked from the notification center\
attributes - null or JSONObject value, it contains the following parameters:\
actionURL - defines the CTA target's value like web URL, text to share, activity URL to be launched (as String)\
target - 0\[Navigate to App], 1\[Navigate to Web], 2\[Navigate to Third-Party App], 3\[Share], 4\[Call], 6\[Universal Link] (as Integer)\
callToImageIndex - 1\[Image One], 2\[Image Two], 3\[Image Three] (as Integer) only appears when the image is clicked in slider/carousal templates\
callToAction - 0\[Defaut Button], 1\[Button One], 2\[Button Two] (as Integer) only appears when the CTA is clicked\
action\_params - contains all key-values actionParams you have set against the click in the push (as JSONObject)\
notification\_id - id of the notification clicked (as String)

## 6. Notification Runtime Permission

[block:html]
{
  "html": "<div style=\"margin-top: 3.5pt !important; margin-bottom: -12pt !important;\">\n  <ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">Android 13 (API level 33) and higher supports a <a href=\"https://developer.android.com/guide/topics/permissions/overview#runtime\">runtime permission</a> for sending <a href=\"https://developer.android.com/develop/ui/views/notifications/notification-permission#exemptions\">non-exempt</a> (including Foreground Services (FGS)) notifications from an app: <a href=\"https://developer.android.com/reference/android/Manifest.permission#POST_NOTIFICATIONS\" style=\"text-decoration: none !important;\"><span style=\"background-color: #f6f8fa; border-radius: 3px; font-size: 85%; margin: 0; padding: .2em .4em; font-family: SFMono-Regular,Consolas,liberation mono,Menlo,Courier,monospace !important; color: #384248 !important;\">POST_NOTIFICATIONS</span></a>. This change helps users focus on the notifications that are most important to them.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">In essence, the new runtime permission feature, enables users to grant or not grant an app the permission to display/post notifications. Additionally, via this specific feature developers can control exactly when a permission dialog will get displayed.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">In case users deny the notification permission, then they don’t see intimations regarding foreground services within the notification drawer. However, users still see messages related to foreground services in the Foreground Services Task Manager, whether or not the notification permission was granted.</span></li>\n</ol>\n\n<ol start=\"1\" style=\"list-style-type: none !important; margin-top: -0.4pt !important; font-weight: 500; margin-left: -30pt !important; margin-top: 14pt !important;\">\n\t<li style=\"line-height: 1.2; margin-bottom: 0pt; padding-left: 10px !important; font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif !important;\nfont-size: 15px !important; text-align: justify !important; line-height: 1.5;\"><span style=\"font-weight: 400 !important;\">Kindly refer to our <a href=\"https://docs.notifyvisitors.com/docs/notification-runtime-permission\">official documentation</a> for more details.</span></li>\n</ol>\n</div>"
}
[/block]