Current location

The HyperTrack mobile SDK collects location and activity data for your users. This data is available as various building blocks for your location features. The most basic building block is the user's current location.

Location object

The HyperTrack location object contains the user's location coordinates, timestamp, activity, and other information about the user's movement and location.

{
    "recorded_at": "2017-06-22T06:52:46+00:00",
    "geojson": {
        "type": "Point",
        "coordinates": [
            -122.39333, 37.77603
        ]
    },
    "bearing": 10.412,
    "speed": 20.214,
    "altitude": 41.95883,
    "accuracy": 25,
    "activity": "automotive",
    "activity_confidence": 80
}
Name Type Description
recorded_at String ISO datetime string to save when the location was recorded
geojson JSON object GeoJSON object to save the location coordinates. Each GeoJSON has a type=Point, and coordinates=[longitude, latitude]
bearing Float Bearing is the horizontal direction, represented as degrees east of north. Can be null or -1 if bearing is not available.
speed Float Speed of horizontal motion, in meters/sec. Can be null or -1 if speed is not available.
altitude Float Altitude of device, in meters. Can be null or -1 if altitude is not available.
accuracy Float Horizontal accuracy of the location, in meters. Can be null if accuracy is not available.
activity String Activity when the location was recorded. Can be walking, stationary, walking, cycling, running, unknown, or an empty string.
activity_confidence Integer Value between 0-100 denoting confidence of detected activity.

Start tracking

Getting the user's current location needs the HyperTrack mobile SDK, available for iOS and Android. You can also use our wrappers for React Native, Cordova or Xamarin.

Pick your mobile platform of choice, install the SDK, and call startTracking(). Once you do, you can get the user's current location on the server with an API call.

Get current location

To fetch the current location of the user, retrieve the user object using the REST API. The user object contains the user's current location.

API call HTTP method Request url
Retrieve user object https://api.hypertrack.com/api/v1/users/USER_ID/
curl "https://app.hypertrack.io/api/v1/users/41caa9f2-ad63-4a8b-98ed-1414c372e1ce/"
  -H "Authorization: token YOUR_SECRET_KEY"

Dashboard view

Once you start tracking, the HyperTrack dashboard shows the user's current location on a map. You can embed this view in your own dashboard using widgets.

Next up

Read about other building blocks, or learn what you can build with them.

results matching ""

    No results matching ""