Im making an app, and want to port it to android which im new to. Where should i place the db? and is the code below enough to successfully connect and query the db or do i need more to just test if it works?
String path = "WHERE_SHOULD_I_PLACE_MY_DB_?";
SQLiteDatabase sqLiteDatabase = SQLiteDatabase.openDatabase(path, null,
SQLiteDatabase.OPEN_READONLY);
Cursor cursor = sqLiteDatabase.rawQuery("select * from table", null);
String something = cursor.getString(1);
System.out.println(something);