Ralf Wickum
Ralf Wickum

Reputation: 3270

How to iterate through all Contentresolver entries?

I have a database in my app, which I fill with data and an ID. Then I request the database with the ID's I want:

Cursor cursor = contentResolver.query(uriPath, null, "ID = ?", new String[]{id1, id2, etc.}, null);

This retrieves me a cursor with all requested ID's .

How can I retrieve all objects in my UriPath ?

Upvotes: 0

Views: 680

Answers (1)

Murat Ceven
Murat Ceven

Reputation: 264

Just enter the Uri and leave the rest null

Cursor cursor = contentResolver.query(uriPath, null, null, null, null);

Upvotes: 1

Related Questions