startManagingCursor(cursor) deprecated method
Asked Answered
C

1

11

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?

Copulate answered 29/11, 2014 at 22:47 Comment(4)
possible duplicate of Android eclipse startManagingCursor Deprecated but want to support older API versions?Katelynnkaterina
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.Katelynnkaterina
Use model-view-presenter (MVP) pattern with RxJava. You will get the most flexibility and not be tied to stupid Activity lifecycle.Liverpudlian
Possible duplicate of CursorLoader with startManagingCursor()Potman
F
10

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.

Fletcher answered 29/11, 2014 at 22:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.