0
I am having trouble saving the name typed by the user in a txt file.
When I press save, it says it was created, but I can’t read.
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");
}
}
And where is your reading method? What have you tried to do?
– perozzo
The permits have come through?!
– viana