ycomp
ycomp

Reputation: 8573

Is ContactsContract.Contacts.LAST_TIME_CONTACTED reliable?

when I read the results on my phone of ContactsContract.Contacts.LAST_TIME_CONTACTED it is usually 0 even for people I phone often... but there are a few fields with numbers other than 0.

Is this not a reliable field to use? I don't understand why most of the people I phoned with this phone are 0

Upvotes: 1

Views: 957

Answers (1)

marmor
marmor

Reputation: 28179

This API field is screwed up by many device manufactures.

According to our testing, the API call Contacts.markAsContacted does one of the following on different manufacture devices:

  • adds one to TIMES_CONTACTED and updated LAST_TIME_CONTACTED (as it should, this is easily tested on plain Android devices like all Nexus devices)
  • adds one to TIMES_CONTACTED but doesn't update LAST_TIME_CONTACTED (if i'm not mistaken, this is the case on all samsung devices)
  • doesn't do anything.

Bottom line, you can't really trust TIMES_CONTACTED and LAST_TIME_CONTACTED to work well on all devices.

There's an open bug for Android here: http://code.google.com/p/android/issues/detail?id=8784&q=LAST_TIME_CONTACTED&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

feel free to star it...

Upvotes: 3

Related Questions