The Android Views SDK is used for getting live location and movement data for devices and trips directly to your Android app. This module subscribes to HyperTrack's GraphQL server end points to get data streams and then renders it in useful callbacks for app developers to build beautiful tracking experiences. This helps developers creating live location views go serverless. Their app users can directly get data securely and privately from the HyperTrack servers.
Check the Integration Guide
- What API levels (Android versions) are supported
- How do I get the DeviceID
- The views SDK doesn't give me views!
- How to manage multiple devices?
- How do I subscribe to a specific Trip via onTripUpdateReceived? Will I get an update for creation, re-calculation, and delay of Trips?
- What does 0
BatteryState
means?
Currently we do support all of the Android versions starting from API 19 (Android 4.4 Kit Kat)
Device id is a way to reference particular device, that is tracked by HyperTrack SDK.
Generally, it's your application logic which devices should be displayed and how to filter/prioritize/select
the one you need to track. If you have doubts regarding how to integrate HyperTrack SDK - look into
corresponding quickstart section.
Once integration is done, device id can be obtained via HyperTrack.getDevcieid()
call on initialized SDK.
Although view is associated with something, that should be visual, here it means view on data, that you retrieve from HyperTrack SDK. Tricky part is that application success nowadays is highly dependends on quality of user experience, that is hardly achievable without fine-grained tuning of UI elements. So using real-time data pushed to your device, you can build exactly the same views you really want. Anyway, ready to use UI elements will be added to upcoming library releases.
You can subscribe to more than one device by executing subscribeToDeviceUpdates
multiple times with
different device ids. Subscription updates consumer can be the same (e.g. map fragment), since each
update has device id field for identification.
Each trip has a device id, for which it was created, pass that id to subscribeToDeviceUpdates
and
you'll receive all the trip recalculations and delays into onTripUpdateReceived
callback.
Using enums in Android is discouraged, so we're using numerical values to represent BatteryState. Check out reference for exact values meaning.