10

I used this code:

Cursor c = cr.query(message, null, null, null, null);
startManagingCursor(c);

But startManagingCursor(c) is a deprecated method. How can i replace it?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
user3253955
  • 433
  • 1
  • 8
  • 17
  • possible duplicate of [Android eclipse startManagingCursor Deprecated but want to support older API versions?](http://stackoverflow.com/questions/9771582/android-eclipse-startmanagingcursor-deprecated-but-want-to-support-older-api-ver) – Alex K Nov 29 '14 at 23:00
  • 1
    I googled the exact title of your post and found the answer. Multiple times, in fact. On the same exact site we're on right now. Googling should always be your first step. – Alex K Nov 29 '14 at 23:00
  • Use model-view-presenter (MVP) pattern with RxJava. You will get the most flexibility and not be tied to stupid Activity lifecycle. – IgorGanapolsky Feb 04 '16 at 16:37
  • Possible duplicate of [CursorLoader with startManagingCursor()](http://stackoverflow.com/questions/19651680/cursorloader-with-startmanagingcursor) – IIRed-DeathII Sep 22 '16 at 12:52

1 Answers1

9

This method was deprecated in API level 11. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package.

Check out this tutorial series.

Community
  • 1
  • 1
Petr Duchek
  • 1,223
  • 14
  • 19