I have this choice:
final Cursor cursorConversations = getContentResolver().query( Uri.parse("content://gmail-ls/conversations/" + Uri.encode(mailAddress)), null, null, null, BaseColumns._ID + " DESC"); ContentQueryMap mQueryMap = new ContentQueryMap(cursorConversations, BaseColumns._ID, true, null);
With ContentQueyMap, I can cache the cursor data and iterate in it also with a closed cursor (I need to improve performance).
Now I want the Corsor selection to extract only the first fifty rows. The loop solution is 50 times in mQueryMap.getRows().entrySet()
is wrong: I don't want mQueryMap to get all cursor lines, but only the first fifty.
Any idea? Is there a where clause to get only the first n lines?
source share