Skip to content

AppsSamplingPackage

The sampling package for collecting installed apps and app usage.

Register it before you deploy a protocol that uses APPS or APP_USAGE:

SamplingPackageRegistry().register(AppsSamplingPackage());

Key points:

  • Both measures only work on Android. On other platforms create returns null, so no probe runs.
  • Registers Apps and AppUsage for JSON deserialization.

See also AppsProbe and AppUsageProbe, which do the collection.

Inheritance

Constructors

AppsSamplingPackage

AppsSamplingPackage()

Constants

APPS

String const APPS

Measure type for one-time collection of the apps installed on this phone.

  • One-time measure.
  • Uses the Smartphone primary device for data collection.
  • No sampling configuration needed.
  • Collected as Apps data.

APP_USAGE

String const APP_USAGE

Measure type for one-time collection of app usage information on apps that are installed on the phone.

Properties

samplingSchemes

DataTypeSamplingSchemeMap get samplingSchemes
override

The default sampling schemes for all dataTypes in this package.

All sampling packages should defined a DataTypeSamplingScheme for each data type.

Methods

create

Probe? create(
  1. String type
)
override

Creates a new Probe of the specified type. Note that type should be one of the dataTypes that this package supports. Returns null if a probe cannot be created for the type.

onRegister

void onRegister()
override

Callback method when this package is being registered.