1

Hi I'm trying to get the last 30 sms messages which works fine if I do this

Cursor c = contentResolver.query(uri, projection, null, null, "date desc limit 30 offset 0");

However, as I scroll my listview I'd like to list more messages so the next query should get me the next 30 sms messages but the ones that are slightly older than the first ones

I tried this but it returns 0 results which I guess makes sense but I can't figure out how to get the next 30

Cursor c = contentResolver.query(uri, projection, null, null, "date desc limit 30 offset 30");

Thank you for any help and I hope what I'm asking is clear basically the first query gets me the last 1-30 rows and then the next query I'm trying to get the last 30 rows right before the first query

user577732
  • 3,956
  • 11
  • 55
  • 76
  • http://stackoverflow.com/questions/3325515/sqlite-limit-offset-query-doubt Visit this link and it might solve you problem. – Krrishnaaaa Jun 15 '13 at 20:00
  • [link] (http://stackoverflow.com/questions/8667978/why-cursorloader-didnt-notify-changes-in-source-data) also mighthelp. – Peter Birdsall Jul 31 '13 at 02:44

0 Answers0