Locations & Geofences

In this section you will find a series of more advanced functionalities that require a more complex development. We recommend that a developer be in charge of this configuration.

Activate geolocated notifications

The indigitall SDK can manage the user's location. This allows you to use the location filters on the send push campaign screen ( Campaigns> Push> New push campaign > Filters> Geographical Filters)

Once we have enabled this functionality, the end user will have to give their consent to the location permission and enable the location services of their smartphone, so that the application can obtain the exact location of the user.


Add the location permissions by including this line in the AndroidManifest.xml file inside the Properties folder of the android project:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

You have to add the RequestLocationPermission parameter when the SDK is initialized in the case of using Xamarin. Forms and mark with the requestPermissionLocation flag, in the case of using Xamarin Classics you only have to add the requestPermissionLocation flag. This is done using the following code excerpt:

//When you want to initialize indigitall in global iOS project::Xamarin.Forms.Forms.Init(this, bundle);
  // otra forma de pdefinir el setdefault: this.ComponentName.ClassName

  var app = new App();


  public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
        base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
        Com.Indigitall.Maui.Push.Platforms.Android.Utils.MPermissionUtils.OnRequestPermissionResult(this, requestCode, permissions, grantResults);


//Initialize the project
 Com.Indigitall.Maui.MIndigitall indigitall = new();
  if (indigitall != null)
      indigitall.Init("YOUR_APPKEY", "YOUR_SENDERID", true);


Add the following keys to the application's Info.plist file.

Keys NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription y _NSLocationAlwaysAndWhenInUseUsageDescription_can be customized by editing the content of the label < string >.
Add the following code in the AppDelegate inside the FinishedLaunching method


  if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
      // iOS 10 or later
      var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
      UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) =>
          if (granted)
              InvokeOnMainThread(() =>

      // For iOS 10 display notification (sent via APNS)
      UNUserNotificationCenter.Current.Delegate = new Com.Indigitall.Xamarin.iOS.UserNotificationCenterDelegate();

      // iOS 9 or before
      var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
      var settings = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null);