Consuming DeviceRegister API in mobile app

Introduction: 

This wiki explains how DeviceRegister API will be consumed in mobile app

Background:

DeviceRegister API is used for capturing the IP address details and the device specifications on both mobile and web platforms.

Problem Statement:

DeviceRegister API should be called before telemetry sync API every 24 hrs(TTL).

Solution :   

  • In GenieSDK Sync api will be invoked after getting success/ failure response from DeviceRegister API.
  • In case of success response current epoch timestamp will be stored in the preference, so every time sync API is invoked it will check the time stamp and decide whether to call the DeviceRegister API or not depending on the TTL.
  • In case of a failure response, invoke sync API.


Conclusion

  • Make the TTL configurable.
  • Store epoch time stamp+ttl  so that every time there shouldn't any date conversion to check if its greater than the specified date.


 Mathew Pallan  Anil Gupta  Souvik Mondal Shriharsh Saboji