You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: