> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Templates

> Add rich push notification templates with timers and progress bars to your Android app using MoEngage.

# SDK Installation

## Installing using BOM

Integration using BOM  is the recommended way of integration; refer to the [Install Using BOM](https://www.moengage.com/docs/developer-guide/android-sdk/sdk-integration/basic-integration/Install-Using-BOM) document. Once you have configured the BOM add the dependency in the *app/build.gradle* file as shown below

<CodeGroup>
  ```Groovy build.gradle wrap theme={null}
  dependencies {
      ...
      implementation("com.moengage:rich-notification")
  }
  ```
</CodeGroup>

Once the BOM is configured, include the specific MoEngage modules required for the application. \
Note: Version numbers are not required for these dependencies; the BOM automatically manages them.

 

# Timer with Progress Bar

## Schedule Exact Alarm Permission

The SDK uses Alarms to periodically update the progress in the progress bar. Starting Android 12, additional permission is required to use exact alarms. Refer to the [documentation](https://developer.android.com/training/scheduling/alarms#exact) for more details. To support the Timer with Progress Bar template on Android 12 and above devices, add the following permission in your manifest file.

<CodeGroup>
  ```xml AndroidManifest.xml wrap theme={null}
  <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
  ```
</CodeGroup>

 

Starting Android 14, the Alarm permission is off by default. So you need to ask for explicit Alarm permission if you want to show Timer notifications apart from adding the previous line in your manifest file. Verify if the permission is already granted and accordingly call the following line to get the Alarm permission from the customer.

<CodeGroup>
  ```Java Java wrap theme={null}
  startActivity(Intent(ACTION_REQUEST_SCHEDULE_EXACT_ALARM))
  ```
</CodeGroup>

 

If the application does not have the permission above, the Timer with Progress Bar template will not be shown to the user; instead, a backup template will be displayed to the user which will have the Timer but not the progress bar.

## Customization

The SDK defines the default color values for the progress bar's background and progress color. These can be customized to suit the application's theme by overriding the values for the below SDK-defined color attributes.

To set the custom color in light and dark mode, override the values in **res/values/colors.xml** and **res/values-night/colors.xml**, respectively.

<CodeGroup>
  ```xml colors.xml wrap theme={null}
  <color name="moe_rich_push_progress_bar_background_color">[YOUR_COLOR]</color>
  <color name="moe_rich_push_progress_bar_progress_color">[YOUR_COLOR]</color>
  ```
</CodeGroup>
