If your data is just being accessed by your app then I would suggest skipping the content provider altogether. The reason being, it will add unnecessary layers between your app and the DB which won't help performance.
I recommend writing a class whose only job is to update/query the database. Then from your other classes/activities you can instantiate this DB access class to get data or put data.
You can have multiple instances of your DB class running at once.
Edit:
Sample code snippets (I took the class definition and a couple methods from my working code) It was my first app, so its not perfect, but it works:
public class VoyagerDB extends SQLiteOpenHelper {
@Override
public void onCreate(SQLiteDatabase db) {
boolean ret = false;
// build out the schema
ret = populateSchema(db);
}
/**
* Returns information from a given obdRequest record.
* @param requestID
* @return
*/
public Cursor getRequestInfo (String requestID) {
Cursor c = null;
String sql = "SELECT id _id, active,request,formula, description,frequency,minValue,maxValue,numDataBytes " +
"FROM obdRequest " +
"WHERE ID=" + requestID;
c = localDBRW.rawQuery(sql, null);
return c;
}
/**
* If the given settings key exists in the DB, return its record ID. Otherwise return blank.
* @param key
* @return
*/
public String settingsKeyExists (String key) {
String recordID = "";
Cursor c = null;
String sql = "SELECT id,key,value from settings WHERE key = ?";
String selectionArgs[] = {key};
c = localDBRW.rawQuery(sql, selectionArgs);
if (c == null) {
return "";
}
if (c.getCount()<1) {
c.close();
return "";
}
c.moveToFirst();
recordID = c.getString(c.getColumnIndex("id"));
c.close();
return recordID;
}
}