Troubleshooting Geofences not being triggered

Troubleshooting Geofences not being triggered

Geofence triggering is affected heavily by mobile device configuration. Each device depends on the connectivity status, location status and permissions granted to the MOCA SDK. 

General troubleshooting steps on every device:

  • Check that there is reliable network connectivity inside your geofence.
  • Check that mobile data is turned on
  • Check that Wi-Fi data is turned on.
    • This changes the Geofence triggering drastically as is used for triangulation.
  • Check that Location is turned on at device level.
    • If the app doesn't have location services running no location can be gathered.
  • Check that the SDK has had a chance to download the updated MOCA data.
    • If no connection is available between the device and the MOCA servers, the SDK will be working with none or older data. Kill and reopen the app to force download of latest data.
  • Check that the location permission for the MOCA SDK is enabled.
    • Even if the device has the location enabled, the app can have the permission denied or When In Use. Permissions for Android need to be requested by developer, and iOS will prompt for degrees of usage. Always is the recommended setting for the SDK.
  • Check that the notification permission for the MOCA app is enabled.
    • If no notifications can be invoked, devices will not get any local or remote push notifications.
  • Check that no battery saving configuration is conflicting with geofencing.
    • Some battery saving configurations on devices disable various geolocation options like background tracking or lower precision considerably. Try whitelisting the App in that battery saving application to check if it's causing issues.

 

Operating system dependant configurations:

On iOS:

  • The MOCA app requires location as "always", to control the "background App refresh" and usage of Mobile data:


  •  Even if the App has all the permissions granted, the master switch of Background App refresh must be active for the App:


  • "Background app refresh" has to be enabled within the app config itself. If not the app will not trigger actions unless it's in foreground.

 

On Android:

  • Permissions have to be requested by developer and granted by the user to the App. 
  • Location has to be set to "Balanced" or "High Accuracy". On "Device Only" Geofences are not triggered.

    • Related Articles

    • Troubleshooting effective Beacon Distances

      Preface  BLE (Bluetooth Low Energy) Beacons are a power-friendly emitting hardware that is commonly used for indoor location. These devices use a short-range radio frequency (in the spectrum of 2.4ghz) and MOCA SDK can use this short range frequency ...
    • Troubleshooting effective Beacon Distances

      Preface  BLE (Bluetooth Low Energy) Beacons are a power-friendly emitting hardware that is commonly used for indoor location. These devices use a short-range radio frequency (in the spectrum of 2.4ghz) and MOCA SDK can use this short range frequency ...
    • How many Geofences per device can I have?

      The limitation is per OS. Currently on Android, the limit is 100 per device. If you have many Geofencing Apps installed, this might cause issues. iOS works slightly different: you get 20 regions per App. This includes Beacons and Geofences. There is ...
    • MOCA iOS SDK LOG_LEVEL Settings

      You can set a variety of logging levels for our SDK in the MOCAconfig.plist file, under the LOG_LEVEL variable:   LOG_LEVEL Description Off Log is turned off at SDK level. Error Shows only error events. Warning Shows only warning events. Info Shows ...
    • iOS: Why did Push notifications work in development but not in production?

      Why did Push notifications work in development but not in production (iOS)? This is a common question. Apple uses basically two servers for their APNS protocol: one is their sandbox (for testing purposes) and the other is for production (live). When ...