[Q] How to group calls from CallLog.Calls by Number topic


Hello everyone,

I've queried Android's CallLog.Calls and populated an ArrayList with my call model object however when I display these objects in a RecyclerView, certain phone-numbers appear multiple times, once for each call entry that was made from or to that number.
I'd like to group the calls from the same number together.

Is there a built-in way in Android to group these call entries so that I can display them as a single entry in my call log RecyclerView?
I tried to add "GROUP BY" to the query but contentResolver.query() does not seem to accept it in any of its parameters.


Thanks!




0 commentaires:

Remarque : Seul un membre de ce blog est autorisé à enregistrer un commentaire.