android - Sinch instant messaging: synchronising messages across devices with differing clocks -


using sinch instant messaging android, how sync messages appear in correct order, if 2 devices have different clocks?

when read the docs message#gettimestamp(), state "returns server side timestamp of message", seems promising. did not work, though: in practice, appears onmessagesent() called local time while onincomingmessage() called server time.

imagine device 1 , device 2 have different clocks , chatting eachother, , device1 ahead of device2. example, device1 has 7:15 while device2 has 7:00. server time 7:00. these findings:

  • device1 sends "first message!"
  • device1: onmessagesent() triggered. m.gettimestamp() returns 7:15 (the local time device1)
  • device2: onincomingmessage() triggered. m.gettimestamp() returns 7:00 (the server time, , local time device2)

shouldn't gettimestamp() return server-side time? missing something?


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -