-1

Thanks for reading my question.

Im attempting to read the date of a SMS message from Android's telephony API. I've been testing on my phone, and my friend just sent me a text message. I assumed its a UTC timestamp, but a few things seem off.

  1. It's negative. And the message was just sent and received.
  2. It's rather short for a UTC timestamp.

Here's what Im currently getting - -1063901466

Any advice into how to convert this to a useable date is definitely appreciated.

Thanks!

Brad Cypert
  • 671
  • 1
  • 8
  • 29

1 Answers1

-1

Silly mistake. I was pulling it from the cursor as an int inboxCursor.getInt(inboxCursor.getColumnIndex("date"));

and it should be

inboxCursor.getString(inboxCursor.getColumnIndex("date"));

Brad Cypert
  • 671
  • 1
  • 8
  • 29