roam-ai/roam-android

Combine `startTracking` and `startSelfTracking` methods

ravikanththummala opened this issue · 1 comments

Discussed in #8

Originally posted by ravikanth-tummala July 22, 2021
Currently

  • The startSelfTracking() does not need user sessions which are basically created using createUser() or getUser() methods.
  • And, they track location locally and does not publish location to Roam.ai servers. Even if the publishSave() methods are being called, they will throw an error.
  • In order to publish location updates to server, along with createUser() or getUser() methods, we have use startTracking() instead of startSelfTracking().

Proposed

  • We can combine the startTracking() and startSelfTracking() into a single method and name it as startTracking()
  • If the user session is not available ie. createUser() or getUser() not being called, the location update works locally and behaves similar to startSelfTracking()
  • And if the user session are enabled using createUser() or getUser() methods and startTracking() will still continue to update locations locally unless until the publishSave() or publishOnly() methods are called
  • Along with this the stopTracking() and stopSelfTracking() into a single method and name it as stopTracking()