Answer the question
In order to leave comments, you need to log in
How to save file to android internal storage via code?
With this code, I save a txt file along the path Android\data\myApp\files\myFileTxt
private File getExternalPath() {
return new File(getExternalFilesDir(null), editName.getText().toString());
}
public void saveTxt(){
try(FileOutputStream fos = new FileOutputStream(getExternalPath())) {}catch(IOException ex) {}
}
Answer the question
In order to leave comments, you need to log in
As far as I know, starting with Android 11, Google has limited storage. You can see more details here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question