context library

A library for collecting context information on:

  • location
  • activity
  • weather
  • air quality

Classes

ActivityDatum
Holds activity information.
ActivityProbe
Collects activity information from the underlying OS's activity recognition API. It generates an ActivityDatum every time an activity is detected.
AirQualityDatum
A Datum that holds air quality information collected through the World's Air Quality Index (WAQI) API.
AirQualityMeasure
Specify the configuration on how to collect air quality data. Needs an apiKey for the World's Air Quality Index (WAQI) API.
AirQualityProbe
Collects local air quality information using the AirQuality plugin.
ContextSamplingPackage
This is the base class for this context sampling package. [...]
Geofence
A class representing a circular geofence with a center, a radius (in meters) and a name.
GeofenceDatum
Holds information about a geofence event of entering, exiting, or dweling.
GeofenceMeasure
Specify the configuration of a circular geofence measure, specifying the: [...]
GeofenceProbe
Listen on location movements and reports a GeofenceDatum to the stream when a geofence event happens. This probe can handle only one GeofenceMeasure. If you need multiple geofences, add a GeofenceMeasure for each to your Study for example using the Trigger model.
GeoLocationProbe
Collects geolocation information from the underlying OS's location API. Is a StreamProbe that generates a LocationDatum every time location is changed. Takes a LocationMeasure as configuration. [...]
GeoPosition
Position coordinated in Degrees (i.e. GPS-style).
LocationDatum
Holds location information using the GPS format.
LocationMeasure
Specify the configuration on how to collect location data.
LocationProbe
Collects location information from the underlying OS's location API. Is a DatumProbe that collects a LocationDatum once when used. [...]
MobilityDatum
A Datum that holds mobility features information collected through Mobility Features package
MobilityMeasure
Specify the configuration on how to compute Mobility Features
MobilityProbe
Collects local weather information using the WeatherStation API.
OMHGeopositionDatum
A TransformedDatum that holds an OMH Geoposition
OMHPhysicalActivityDatum
A TransformedDatum that holds an OMH PhysicalActivity
WeatherDatum
A Datum that holds weather information collected through OpenWeatherMap.
WeatherMeasure
Specify the configuration on how to collect weather data. Needs an apiKey for the OpenWeatherMap API.
WeatherProbe
Collects local weather information using the WeatherStation API.

Constants

earthRadius → const double
Earth radius in km.
6371000.0

Properties

locationManager LocationManager
read / write

Functions

degToRad(num deg) double
Convert degrees to radians.
radToDeg(num rad) double
Convert radians to degrees.

Enums

GeofenceState
The possible states of a geofence event.
GeolocationAccuracy