Skip to content
cketcham edited this page Jul 19, 2012 · 2 revisions

Experimental

This feature is still experimental. Its definition may change at any time, without notice, and the data collected by it may be deleted on the development machines at any time.


Table of Contents



Probes

A Probe is a point of data which belongs to a stream from an observer. In most cases, the ohmageProbeLibrary should be used to connect to the ohmage service and write data to it. The ohmageProbeExample apk was written as an example which uses the ohmageProbeLibrary to write probe data and responses to ohmage.

Requirements

  • A version of ohmage that accepts probes needs to be installed.
  • An observer needs to be defined on the server. Information on creating an observer can be found on the ohmageServer wiki.

Interface

Probe applications can either use the ohmageProbeLibrary to help write probes and responses, or they can be written to ohmage directly through the aidl interface defined by src/org/ohmage/probemanager/IProbeManager.aidl. Instructions for using the aidl interface can be found on this page. Instructions on using the ohmageProbeLibrary can be found here. More general information on using aidl can be found here: http://developer.android.com/guide/components/aidl.html.



What does it do?

Allows a probe to send data to ohmage

Method

boolean writeProbe (in String observerId, in int observerVersion, in String streamId, in int streamVersion, in int uploadPriority, in String metadata, in String data);

Input Parameters

Parameter Description
observerId The unique ID defined by the observer.
observerVersion The version of the observer you are trying to send data to.
streamId The name of the specific stream the data should be sent to. This should be a stream defined in the observer xml.
streamVersion The version of the stream.
uploadPriority This value is unused.
metadata The formated metadata for this probe as a JSON string.
data The formated data for this probe as a JSON string as defined by the avro schema.

Back to Top



What does it do?

Allows a probe to send response data to ohmage

Method

boolean writeResponse (in String campaignUrn, in String campaignCreationTimestamp, in int uploadPriority, in String data);

Input Parameters

Parameter Description
campaignUrn The campaign urn that this response belongs to.
campaignCreationTimestamp The creation timestamp of the campaign.
uploadPriority This value is unused.
data The formated data for this response as a JSON string. The format of this data is described by the Survey Response JSON Format here.

Back to Top



ohmageProbeLibrary

The ohmageProbeLibrary was created to make connecting to the ohmage service and writing data easier. Documentation for the library can be found here

ohmageProbeExample

The ohmageProbeExample apk was also written as an example which uses the ohmageProbeLibrary to write probe data to ohmage. More info can be found here.

Back to Top