To integrate Geofence, Go to Unity Editor, navigating to
Assets > Import Package > Custom Package and import the
The above package is part of the
.zip file you downloaded during installation.
To use geofencing, your app must request the following:
- ACCESS_BACKGROUND_LOCATION if your app targets Android 10 (API level 29) or higher
For Geofence pushes to work your Application should have location permission and Play Services' Location Library should be included.
Refer to the documentation for more details.
Add the Geofence configuration to the
MoEngage.Builder while initializing the SDK using the
MoEngage moEngage = new MoEngage.Builder(this, "XXXXXXXXXXX") .configureGeofence(new GeofenceConfig(isGeofenceEnabled, isBackgroundSyncEnabled)) .build(); MoEngage.initialise(moEngage);
Post integrating the Geofence package, call
StartGeofenceMonitoring() method as shown below to support geofence campaigns in your iOS app:
using MoEngage; // Only for iOS MoEngageClient.StartGeofenceMonitoring();
Updated 4 months ago