Multiple Device Support

You use HyperTrack to track movement of your users. But in reality you are tracking the mobile device that your users are using. In essence, a user's tracking session is uniquely defined by his/her mobile device.

Often, users log into apps from multiple mobile devices either knowingly or unknowingly. This results in multiple devices (with your apps and with HyperTrack SDKs) sending location, activity and health data to HyperTrack server. ​

Why is it a problem?

Take example of a fitness app. If your user leaves one of the logged-in device at home, and takes the second device with her for the run at a park, it becomes difficult to ascertain what she was really upto. ​

Default config makes latest device the active device

Your account by default is configured to making the latest device (the device that mostly recently sent the data) as the active device. You would receive a device.new.switched webhook call whenever a new device is detected. ​ Use this config if you don't care about supporting logins from multiple devices, and want HyperTrack to work seamlessly as users keep switching to new devices. ​

Custom config to manually switch the active device

You also can use HyperTrack to handle multiple devices by changing the account config. Visit your HyperTrack Dashboard Settings. ​ Changing config on dashboard

When you do so, the new device becomes the active device ONLY WHEN getOrCreateUser method is called from the SDK on that device. On calling this method:

  • You would receive a device.new.switched webhook call
  • The SDK will start ignoring the events sent from the earlier device ​ With this custom config, if you don't call the getOrCreateUser method from that new device:
  • The locations, activity and health data from the new device will be ignored,
  • createAction/completeAction call from the SDK will fail
  • You would receive a device.new.ignored webhook call ​ Use this config if you want to support logins across multiple devices and want HyperTrack to switch tracking to a new device only in certain scenarios. ​

    Best practices to handle multiple devices

    In case your app doesn't need to support logins across multiple devices, it is best to implement a Session Logout feature which automatically logs the user out as soon as he/she logs into your app from a different device. Alternatively, you can simply prevent the successive login attempts from a different device.

results matching ""

    No results matching ""