There is a DBHelper helper class inherited from SQLiteOpenHelper , which has all the methods for working with a database (opening, creating, updating, etc.). In the assets folder there is a plain text db.txt .
Is it DBHelper to access the db.txt file in the db.txt ? Through getAssets () it is impossible.
Wrote like this, but displays nothing
public void getStringFromAssetFile(Context myContext) { AssetManager am = myContext.getAssets(); try { BufferedReader buf = new BufferedReader(new InputStreamReader(am.open("db.txt"))); String tmpStr; while ((tmpStr = buf.readLine()) != null) { try { System.out.println(tmpStr); } catch (Exception e) { } } } catch (IOException ex) { ex.printStackTrace(); } }