Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped storage MFMT not working Android 14 #215

Open
Xavron opened this issue Jan 26, 2024 · 0 comments
Open

Scoped storage MFMT not working Android 14 #215

Xavron opened this issue Jan 26, 2024 · 0 comments

Comments

@Xavron
Copy link

Xavron commented Jan 26, 2024

Not yet converted over from File to new scoped storage.

Fails: "MFMT failed, unable to modify last modification time"

Update: There doesn't appear to be any possible way to set lastModified time with scoped storage (DocumentFile, DocumentsContract, etc). Looked at it quite a bit and nothing. They don't provide it. Since File fails, looks like its a dead end.

Can't fix. Maybe something will be possible in time when Android further changes.

Workarounds:
A. Android OS built-in zip extraction can keep original file dates here but doesn't do any good for the scope of this app. Users can do that as a really horrid workaround.

B. Another way, use an ALL FILES enabled degraded security version of the app if that continues to work and is available - download only from a trusted source if going that way as nefarious actors can reap all your files quietly with that in use. The way Google chose to deal with that is scoped storage instead of other possibilities. Untested.

Info:
https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED
A DocumentsProvider can update it if one makes it available to do so. DocumentsProvider is system permission only. It appears to me as if it will only update it eg when the file stream is closed, file is appended, etc. Useless with nothing to set. DocumentsContract does not anywhere ask for modified value. DocumentFile has a get only for it so that's out.

Oddities like getContentResolver just don't appear to help any here. Although perhaps something could be buried awkwardly but I don't see anything that suggests it.

@Xavron Xavron changed the title [bug] scoped storage MFMT not working Android 14 Scoped storage MFMT not working Android 14 May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant