Make ACTION_CREATE_DOCUMENT override the file if the file already exists instead of appending (n) to it

Viewed 185

I am using the ACTION_CREATE_DOCUMENT intent when creating a file in my app.
To support scoped storage, I am trying to use ACTION_CREATE_DOCUMENT to create a file, but in case the file is already present, Android's Storage Access Framework (SAF) by default appends (n) to the file and does not override the old file.

Is there any way to to find a way that file already exists or force override the file with a warning?

0 Answers
Related