Activity

The activity object contains the user's activity type, along with relevant meta data. If the activity cannot be determined, the object provides the reason why it could not be determined. The object also gives the timestamp when the activity started.

Activity Object

Name Type Description
type String Specifies the type of activity if known; else returns unknown
unknown_reason String Specifies the reason why the activity is unknown. Is null when activity is determined
started_at String ISO datetime string of when this activity started
ended_at String ISO datetime string of when this activity ended. It is null if the activity hasn't ended yet
steps Integer Number of steps taken in the current activity. It is non-zero only when type is stop, walk or run

Activity types

Name Description
drive Returned when the user is driving
cycle Returned when the user is cycling
walk Returned when the user is walking
run Returned when the user is running
stop Returned when the user is stopped
unknown Returned when the activity cannot be determined

Activity unknown reasons

Reason Description
location_disabled Returned when the user has turned off location on the device
location_permission_denied Returned when the user has denied location permission to your app
activity_permission_denied Returned when the user has denied Motion and Fitness permission to your app (available only for iOS devices)
sdk_killed Returned when the HyperTrack SDK was killed on user's device
device_off Returned when user's device was switched off (available only for Android devices)
tracking_paused Returned when user's device was not being tracked as pauseTracking() had been called on the device

Sample JSON

Drive activity

{
    "type": "drive",
    "unknown_reason": "",
    "started_at": "2018-03-21T06:37:29.841000Z",
    "steps": "0"      
}

Walk activity

{
    "type": "walk",
    "unknown_reason": "",
    "started_at": "2018-03-21T06:37:29.841000Z",
    "steps": "150"      
}

Unknown activity

{
    "type": "unknown",
    "unknown_reason": "activity_permission_denied",
    "started_at": "2018-03-21T06:37:29.841000Z",
    "steps": "0"      
}

results matching ""

    No results matching ""