> ## 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.

# How Do Location Triggered Push Campaigns Work in MoEngage?

> Understand how location-triggered push campaigns are configured, evaluated, and delivered in MoEngage.

## Problem

Issues occur while working with location-based push notifications.

## Solution

1. Open the AndroidManifest.xml file and add the following dependency:

<Frame>
  <img src="https://mintcdn.com/moengage/kA1FMKEyetrXvCeI/images/13.png?fit=max&auto=format&n=kA1FMKEyetrXvCeI&q=85&s=fa6147553d6f267a2a9f91821d983cd6" alt="13" width="1024" height="359" data-path="images/13.png" />
</Frame>

2. Open the app level `build.gradle` file, and add the following dependency:

<Frame>
  <img src="https://mintcdn.com/moengage/kA1FMKEyetrXvCeI/images/14.png?fit=max&auto=format&n=kA1FMKEyetrXvCeI&q=85&s=a4fa66cc4fce6c73ef7c06c47d4d1249" alt="14" width="1024" height="530" data-path="images/14.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/moengage/kA1FMKEyetrXvCeI/images/16.png?fit=max&auto=format&n=kA1FMKEyetrXvCeI&q=85&s=93b307a585da16f23f520a1382d4daad" alt="16" width="1024" height="290" data-path="images/16.png" />
</Frame>

3. Refer to the following sections in the [Location Triggered](https://www.moengage.com/docs/developer-guide/android-sdk/push/optional/location-triggered) documentation to create a location-triggered push campaign:

* Creating a Geofence.
* Users entering or exiting the Geofence.
* Users dwelling under the Geofence.

4. After following the documentation and adding the necessary dependencies and permissions, opening the app on Android 14 and above devices displays the user's permissions, as shown in the screenshot.

<Frame>
  <img src="https://mintcdn.com/moengage/kA1FMKEyetrXvCeI/images/15.png?fit=max&auto=format&n=kA1FMKEyetrXvCeI&q=85&s=7f6160e77cb90a92cd3ac6a3215a073b" alt="15" width="626" height="1302" data-path="images/15.png" />
</Frame>

Android devices list two location permission settings:

* **Allow all the time**
* **Allow only while using the app**: By default, Android 14 and above devices grant location access only while the app is active.
* On Android 14 and above devices, the default `"Allow only while using the app"` location permission blocks geofence and location-triggered pushes when the app is closed or in the background. Change the location permission setting to `"Allow all the time"` so that location-triggered campaigns run in all states.

This is the default behavior for all devices running Android 14 and above.
