Search code examples
androidcallloggingandroid-contentprovider

Getting the DISTINCT most recently contacted contacts from Call Log


Since it is not possible to use DISTINCT while querying the CallLog.Calls.CONTENT_URI, what can be a good workaround for getting the distinct most recently contacted contacts from the call logs?


Solution

  • It wouldn't be a GET distinct, but if you got them then stored them into a Set, say a TreeSet you'd be left with a distinct list.

    HTH