Time elapsed since Status has been posted error.

Forums » Android - Learning Android book > Time elapsed since Status has been posted error.
February 14, 2012 8:42:19 AM PST (one year ago). Seen 504 times. 2 replies.
Photo Tudor Luca
Home
Member since Feb 14, 2012
Forum Posts: 2
I have a very weird problem with the app: it doesn't show the correct time passed since the Status has been posted. And here is the weird part: on the emulator it works perfectly, it shows the correct time elapsed (eg: 10 minutes ago), but on an actual smartphone (I'm using a Samsung Galaxy S2 v2.3.3) it shows the time elapsed since the Status has been inserted into the database. Any ideas why?
February 14, 2012 9:01:49 AM PST (one year ago)
Photo Tudor Luca
Home
Member since Feb 14, 2012
Forum Posts: 2
I tested your source code, and it looks that it behaves the same: on the emulator is perfect, but on the actual phone it gives me the time when the statuses have been "downloaded".
February 22, 2012 7:23:16 PM PST (one year ago)
Photo Marko Gargenta
@MarkoGargenta
Marakana, Inc.
Member since Jan 19, 2007
Location: San Francisco
Forum Posts: 227
Hmm, I'm pretty sure we get the createdAt time from the cloud and calculate relative time with System.currentTimeInMillis(). I'm not sure why it'd be different on real device.