User device location information can provide you with important insights by allowing you to segment users based on their geographic location. To facilitate this, the TUNE iOS SDK 3.10.0+ and TUNE Android SDK 4.0.0+ automatically collects the user device geo location when a measure call is fired (ex. “measureSession“, “measureEvent“).
When our SDK detects the presence of the CoreLocation framework on iOS, or access location permissions on Android, it auto-collects the device location (only if the end-user allows your app to access the device location). If you explicitly call “setLocation:“, then the SDK uses the provided location during the app session and then stops auto-collecting the location.
This feature does not force you to include CoreLocation framework or Android location permissions, if your app does not need it otherwise. Even when location is present, the TUNE SDK never prompts the end-user for permission to access location information. It is the responsibility of your app to prompt the user for permission to access location information.
If the user does not enable location, then there is no location for the SDK to collect. If the user enables location but does not allow your app to collect the device’s location, then again, the SDK cannot collect the location.
To help conserve battery, the SDK accesses the device location only once when an event measurement call is fired. The auto-collected location info includes latitude, longitude, and altitude. On iOS, it also collects horizontal accuracy, vertical accuracy, and timestamp — properties from CoreLocation.CLLocation.
You can call a setter to control the SDK device location auto-collection behavior:
Select a preferred platform.