I am writing a content provider for this application and in my content provider I am opening a database connection, running a query and returning the cursor of results to th
It is perfectly fine by leaving the database connection opened throughout the entire runtime of your app, you just have to make sure you close the cursor after once you're done with it.
I presume you're querying and using the cursors in an Activity? if so make sure you are closing the cursors by calling the cursor.close();
method, I notice if you're not closing the cursors in an Activity and then moving onto another Activity that you will get these leak messages when running another query.
I find that it's best practice to override the onDestroy method in your activity and close all the cursors in it.