I am writing an Android application and asking myself how to control cursors. I know how to get data using a cursor from a database. I do not want to handle the life cycle of these cursors myself. For Android 2.x and below, I used, according to the Android API, methods such as manageQuery and startManagingCursor. These methods are now outdated. Instead of these methods I should use the Loader class (CursorLoader). As far as I know, CursorLoader should be supported by ContentProvider. The Android SDK recommends ContentProvider only if I want to share my data. But I just want to write a simple application in which data should not be shared. In all my research, I just find tutorials about downloaders combined with ContentProvider. The SDK says that I can write my own bootloader on the AsyncTaskLoader class.Does anyone already have experience with such a bootloader? Are there any best practices? Are there any good futuristics, how to implement such a loader? Or is it better to implement ContentProvider, so I can use CursorLoader (this means that working with a controlled cursor requires a lot of work)?
crimi source
share