Retriving requried data form Content Providers using single cursor.
- by HellBoy
I want to retrieve Name,Number,Company,and Designation so I am retrieving it using 2 cursor as follow
Cursor cursor1 = getContentResolver().query(Data.CONTENT_URI,
new String[]{Organization.COMPANY, Organization.TITLE}, Data.MIMETYPE +
"='" + Organization.CONTENT_ITEM_TYPE + "'", null, null);
Cursor cursor2 = getContentResolver().query(Phone.CONTENT_URI,
new String[]{Phone.NUMBER, Phone.DISPLAY_NAME}, null, null, null);
but How retrieve using one cursor or passing query one time only.