I'm having trouble saving the user-entered name in a txt file.
When I press save, it says it was created, but I can not read it.
Context fileContext;
public BancoDeDados(Context fileContext) {
this.fileContext = fileContext;
}
public void gravar(String nome) {
try {
FileOutputStream os = fileContext.getApplicationContext().openFileOutput("bdNome.txt", Context.MODE_PRIVATE);
os.write(nome.getBytes());
os.close();
System.out.println("Salvou");
} catch (IOException e) {
System.out.println("Deu erro");
}
}