trackingIsEnabled
Determine if tracking is enabled, such as for location tracking.
🔑 Minimum required license level: Core.
Sample usage
try {
val networkDiagnostic = rasp.diagnostic.network
val trackingCheck = networkDiagnostic.trackingIsEnabled()
Log.d("RASP-DEMO", "[networkDiagnostic] trackingIsEnabled: $trackingIsEnabled")
} catch (e: Exception) {
Log.e("RASP-DEMO", "[networkDiagnostic] trackingIsEnabled error: ${e.message}")
}
Content copied to clipboard
To observe changes of the tracking check you can use the observe() method.
val modelNetwork = rasp.watcher.network.observe()
launch {
networkModel.trackingIsEnabled.collect { detected ->
if (detected != null && detected) {
Log.d("RASP-DEMO", "[trackingIsEnabled] $detected")
}
}
Content copied to clipboard
Return
Pair<Boolean, ArrayList<TrackingDiagnosticSymptom>>
— Boolean
true if the geolocation is currently detected, — ArrayList<TrackingDiagnosticSymptom>
symptoms of location features/providers enabled on the device.
Since
v1.4.0 - New return parameter: ArrayList