• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps ContentProvider count(*)

Gabox01

Lurker
Oct 9, 2010
1
0
Hi,

Anybody knows how to query a ContentProvider in way to return only the row count?

i want select count(*) from table

How can i pass that to this method? :

Code:
 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
            String sortOrder) {

Thanks,
Gabox
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones