23

Is there a way to sort contacts by date added, or at least see contacts that have been recently added? I'm running android os 2.2.

James
  • 813
  • 1
  • 8
  • 16

4 Answers4

4

As most of the applications mentioned did not work anymore two approaches worked for me now (Aug 2020):

Update 2022-03 Contacts API is being deprecated. Migrate to People API to retain programmatic access to Google Contacts. See https://developers.google.com/people/contacts-api-migration.

Steps to use the api:

  1. Open the playground website: https://developers.google.com/oauthplayground/
  2. Open Step 1, expand "People API v1" and click the url below (https://www.googleapis.com/auth/contacts) then the blue button "Authorize APIs" (login with your Google account if not done already and grant permissions)
  3. Open Step 2 and just click the blue button "Exchange authorization code for tokens"
  4. Open Step 3 and put the url https://people.googleapis.com/v1/people/me/connections?pageSize=25&sortOrder=LAST_MODIFIED_DESCENDING&personFields=names,metadata into the "Request URI" field and click the blue button "Send request"
  5. Find your results on the right in the "Request / Response" textarea.
  • pageSize=25 limits the shown contacts to 25
  • sortOrder=LAST_MODIFIED_DESCENDING sorts the results by last modified date, descending
  • personFields=names,metadata limits the returned results to contain only names and metadata [plus basic info]

See also

  • 1
    I like your second approach, but I ran into an issue with it. Somehow the sorting is messed up because it is using the wrong updateTime field to sort on. I found a solution in this SO question To the Request URI you can add: &sources=READ_SOURCE_TYPE_CONTACT – Sebastian Nov 02 '22 at 11:40
4

This is useful if you want programmatic and CLI access to your contacts in sorted order.

If you're on Android then most probably your phone contacts are synced with your Google account's contacts which you can access using Google Contacts. Now, using the Google Command Line Tools you can return contacts in order of filing if no other sort method is set.

For example, use the following command to get all contacts in a text file in recently added order:

google contacts list ".*" > output.txt

Cheers.

Mario Awad
  • 141
  • 3
3

Short answer: I made an app for this called Quis, and would love to hear if it solves your problem :)

Longer answer: Android doesn't save the date you added contacts, unfortunately. However, there is a trick: you can sort contacts by their "raw ID" in the database, which roughly increase over time. It's not perfect, meaning that it will more or less work for recent contacts, but definitely won't work for contacts added years ago since a lot of things probably happened since then – new phone, Google merging/syncing contacts, and various third-party apps messing with the contacts database.

I wanted this so badly I actually made an app for it. It stores the date and location of newly added contacts, and also uses the above trick for contacts added before using the app. Would love to hear your thoughts!

J. V.
  • 131
  • 1
2

I suppose it might vary by carrier, but I only see options to sort by first or last name. (Motorola Droid, unrooted, Android 2.2.1)

I also don't see any apps in the Market that would display contacts sorted by date added.

I'm not even sure "date added" is captured.

If you're syncing with Google Contacts you might be able to kludge something together by applying a group to all of you existing contacts ("Old Contacts"?) then, whenever you review your contacts anyone without such a label is, by definition, recently added.

It is, as I said, kludgy. I don't see any other way to do it.

ale
  • 19,723
  • 34
  • 110
  • 159