Closed breautek closed 1 month ago
For clarity... The difference is imageUri
will start off with a Uri object representing content://some-path/...
or file:///some-path/...
but if the activity was destroyed, it will get restored with an Uri representing /some-path/
, missing the Uri scheme.
Platforms affected
Android
Motivation and Context
The imageUri field is not properly restored if the activity is killed, which can cause further issues.
This is because
imageFilePath
was used instead for the imageUri which only contains the path of the original URI, losing the scheme in the process.Description
Serialize using
imageUri.toString()
instead of using the imageFilePathTesting
paramedic testing + testing with
Don't Keep Activities
developer option enabled.Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)