The location entities that you associate to sites and zones determine how the mobile app messaging SDK monitors mobile devices at locations and triggers location universal behaviors.
Using the device location awareness (DLA) service, mobile apps can detect and send geofence beach events and beacon breach events to the Acoustic Campaign. These events can be used to trigger location-based messages. Messages, geofences, and beacons are defined by marketers and location administrators after the application is deployed on app stores.
How geofences track mobile devices
Location events are triggered when a mobile device interacts with a geofence boundary, such as when a mobile device crosses a geofence.
After you implement geofences in the SDK, the following actions occur automatically:
- The mobile app messaging SDK contacts the mobile app messaging server and requests a list of device location awareness locations that are within a specified distance of the user's current location.
- The SDK registers nearby geofences with the operating system.
- The SDK requests permission from the operating system to receive background location updates about the device.
- The operating system provides location updates to the SDK at timed intervals, such as every 5 minutes, and when the user moves significantly.
- The SDK adjusts the registered geofences to be the geofences that are closest to the user.
- When a device breaches a geofence, the operating system calls back to the SDK. The SDK then sends a geofence breach universal behavior through the DLA service to Acoustic Campaign.
- Acoustic Campaign determines whether any location-based messages refer to the breached geofence and if they do, sends the mobile app message to the user of the device.
How beacons track mobile devices
A beacon broadcasts an identifier to the area around it using a low-power radio. When a mobile device that has the company's mobile app installed is near a beacon, it receives the identifier and detects the beacon.
After you implement beacons in the SDK, the following actions occur automatically:
- The mobile app messaging SDK contacts the mobile app messaging server and requests a list of device location awareness locations that are within a specified distance of the user's current location.
- When a mobile device enters a beacon location, the SDK collects the major numbers of nearby beacons.
- The SDK sends the UUID and majors of nearby beacons to the DLA server, which returns associated minors to the SDK. The mobile app starts monitoring the minors. Even if your app user enters a location with the app in background mode, your beacons are monitored.
- When a device detects a beacon, the SDK sends a beacon breach universal behavior through the DLA service to Acoustic Campaign.
- Acoustic Campaign determines whether any location-based messages refer to the breached beacon and if they do, it sends the mobile app message to the user of the device.
Note: The app user must run your app at least once for the app to register that it wants beacon updates. If your app user restarts the phone, the operating system sees that it is registered for beacon updates and listens for beacons.
Each major beacon location consists of 18 minor beacon locations. In case you need more than 18 locations, you must create a new major location. Make sure your major locations do not overlap so that beacons can monitor whether your app user has left one major location and entered another.