i have a hard time figure out how to create a new table with my content provider, i have made one provider for this authority : com.mypackage.database/chats , inside it, it works well but i have several databases made with SqliteOpenHelper, with name for example "mydb.db" , in the same package . what i need is some thing like this :
if(uriMatcher.match(Uri.parse("content://com.lifemate.lmmessenger.database/chats/mynewtable))== -1){
System.out.println();
Log.i("loader","Table Didnt Exists,Creating it...");
String sqlCreate = "CREATE TABLE IF NOT EXISTS " + "'"+CurrentTarget+"'"
+ " (_id INTEGER PRIMARY KEY AUTOINCREMENT,"
+ " username TEXT,"
+ " message TEXT,"
+ " isfile TEXT,"
+ " isright INTEGER,"
+ " time CHAR,"
+ " delivery INTEGER)";
mDb.execSQL(sqlCreate);
VCards.vCardsInstance.DownloadVCards(CurrentTarget);
}
is there a way i can contact them with my ContentProvider, or is there any way i can Create a new Table Using the Provider? Thanks alot