Android: Distinct and GroupBy in ContentResolver
问题 What would be the correct way to add DISTINCT and/or GROUPBY to ContentResolver -based queries? Right now I have to create custom URI for each special case. Is there a better way? (I still program for 1.5 as lowest common denominator) 回答1: You can do nice hack when querying contentResolver, use: String selection = Models.SOMETHING + "=" + something + ") GROUP BY (" + Models.TYPE; 回答2: Since no one came to answer I'm just going to tell how I solved this. Basically I would create custom URI for