Beacon detection troubleshooting is divided in three steps: SDK configuration, device configuration and MOCA Console configuration.
1. MOCA SDK requires the following configuration checks in the MOCA.properties file:
- Flag proximityService is present and set to true. E.g. proximityService=true
- Flag geoTrackingService is present and set to true. E.g. geoTrackingService=true
- Flag backgroundLocation is present and set to true. E.g. backgroundLocation=true
- Flag mocaDriver is present and set to true. E.g. mocaDriver=true
- Flag beaconProfile is present and set to any value in [LowLatency, Balanced, BatterySaver, Custom]. E.g. beaconProfile=Balanced
- If the profile is custom, you require the following flags and values:
The MOCA SDK requires that you request for the necessary permissions. In this case Beacons require the Location Permission. Make sure your app requests this permission before attempting to interface with Beacons. Please note that Android 10 has a permission called “while in use” and this causes the SDK to only see beacons if the App is in foreground. Below Android 10 the Location Permission will allow for beacon scanning when the app is not in foreground.
You can set and view the state of each service programmatically using the following methods:
2. The second step is to troubleshoot the device used to detect the beacons:
- Double check if Bluetooth is active.
- Ensure the application hasn’t been put to sleep by the manufacturers power saving app. A very informative link here about this popular issue.
- Check that your native Android Battery Saver is not turned on.
- Make sure the notifications for your app are active and the channel has not been muted.
- Use an app that detects iBeacon BLE devices in order to evaluate if the beacon per se needs configuration (advertising interval, signal strength, dynamic UUID).
3. The third step is to make sure the beacon is registered in the MOCA Console and the UUID, major and minor are identical to the ones that the beacon is currently broadcasting. Once the beacon has been set up accordingly, proceed to generate an Experience that uses such beacon as a trigger. A step by step guide to test proximity after SDK integration can be found here.