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

# Location Triggered

> Import the Geofence package to enable location-triggered push notifications in your Unity app.

To integrate Geofence, Go to Unity Editor, navigating to `Assets > Import Package > Custom Package` and import the `Geofence.unitypackage`. The package is part of the `.zip` file you downloaded during installation.

<Frame>
  <img src="https://mintcdn.com/moengage/b13dNrqwcDhjET-m/images/Locationtriggered1.png?fit=max&auto=format&n=b13dNrqwcDhjET-m&q=85&s=a285e38ab86b8b50c7013403444faf5b" alt="Locationtriggered1" width="1296" height="734" data-path="images/Locationtriggered1.png" />
</Frame>

# Initialization

Add ***MoEGeofenceGameObject.cs*** to the same object created in the [Unity Initialization](/developer-guide/unity-sdk/sdk-integration/sdk-initialization/sdk-initialization) step and set the ***App Id***

<Frame>
  <img src="https://mintcdn.com/moengage/b13dNrqwcDhjET-m/images/Locationtriggered2.png?fit=max&auto=format&n=b13dNrqwcDhjET-m&q=85&s=d69c3c72d9e73e96082ddb8657dd3934" alt="Locationtriggered2" width="2406" height="710" data-path="images/Locationtriggered2.png" />
</Frame>

# Android Configuration

## Prerequisites for Geofence

To use geofencing, your app must request the following:

* ACCESS\_FINE\_LOCATION
* ACCESS\_BACKGROUND\_LOCATION if your app targets Android 10 (API level 29) or higher

<Warning>
  For Geofence pushes to work your Application should have location permission and [Play Services' Location Library](https://developers.google.com/android/guides/setup#declare-dependencies) should be included.
</Warning>

Refer to the [documentation](https://developer.android.com/training/location/geofencing#RequestGeofences) for more details on Geofence.

# iOS Configuration

Post integration with the geofence package make sure to  [Build and Replace](/developer-guide/unity-sdk/sdk-integration/sdk-initialization/ios-sdk-initialization) for iOS.

# Configuration

## Start Geofence Monitoring

After integrating the geofence package call ***StartGeofenceMonitoring()*** method to initiate the geofence module, this will fetch the geofences around the current location of the user. Please take a look at the [iOS doc](/developer-guide/ios-sdk/push/optional/location-triggered) and [Android doc](/developer-guide/android-sdk/push/optional/location-triggered) for more information on Geofence. By default, the geofence feature is not enabled. You need to call the ***S***\*\**tartGeofenceMonitoring*()\*\*to receive location-triggered

<CodeGroup>
  ```c# c# theme={null}
  using MoEngage;
  MoEngageGeofenceClient.StartGeofenceMonitoring();
  ```
</CodeGroup>

## Stop Geofence Monitoring

If you want to stop the geofence monitoring or feature use the ***StopGeofenceMonitoring()*** API. This API will remove the existing geofences.

<CodeGroup>
  ```c# c# theme={null}
  using MoEngage;
  MoEngageGeofenceClient.StopGeofenceMonitoring();
  ```
</CodeGroup>
