AppUsageProbe
Collects usage information on the apps installed on this device as AppUsage data.
Used for the AppsSamplingPackage.APP_USAGE measure. The period starts at the last time this probe collected data or, the first time, at HistoricSamplingConfiguration.past before now. The period ends now.
Only runs on Android, and needs the PACKAGE_USAGE_STATS permission.
- Inheritance
-
- Object
- AbstractExecutor<
Measure> - Probe
- MeasurementProbe
- AppUsageProbe
Constructors
AppUsageProbe
Properties
samplingConfiguration
The sampling configuration for this probe.
Configuration is obtained in the following order:
- from the Measure.overrideSamplingConfiguration
- from the DeviceConfiguration.defaultSamplingConfiguration of the deployment
- from the DeviceConfiguration.dataTypeSamplingSchemes of the static device configuration
- from the SamplingPackage.samplingSchemes of the sampling packages
Returns null in case no configuration is found.
See also the section on Sampling schemes and configurations in the CARP Core Framework. In addition to CARP Core, CARP Mobile Sensing also supports sampling schemes in the sampling packages, which are used as the 4th possible configuration in the list above.
Methods
getMeasurement
Subclasses should implement this method to collect a Measurement.
Can return null if no data is available. Can return an Error measurement if an error occurs.