I have written an app for android, and I want to make it compatible to new and old versions of android.
For instance there’s the CursorLoader class that exists since API 11.
What I would like to achieve is to use the CursorLoader if the device runs with an API >=11 and use the deprecated managedQuery method if the device runs an older version.
What is the recommended approach in this case?
Thanks in advance
I believe cursor loader is included in the support library (CursorLoader).
To add the support library to your project:
Example pertinent part of the manifest:
If you insist on not using the support library you can do things like
in your code.