Use of MediaStore in SaveImageToFileWorker.kt throws an exception
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the failure in SaveImageToFileWorker.kt and capture the exception, then read the MediaStore call and related flow in BlurActivity. Review issue 259 for related context. Done means the image is stored, outputImageUri is populated, and the See File button becomes visible.
Written by the indexing model from the issue text.
Description
In SaveImageToFileWorker.kt the code line
val imageUrl = MediaStore.Images.Media.insertImage(
resolver, bitmap, Title, dateFormatter.format(Date()))
throws an exception; hence no image is stored and no output is produced. As a result in BlurActivity the final check to activate the seeFileButton using the code
// If there is an output file show "See File" button
if (!outputImageUri.isNullOrEmpty()) {
viewModel.setOutputUri(outputImageUri as String)
binding.seeFileButton.visibility = View.VISIBLE
}
always fails
This may be related to issue 259
PS I am using android studio 2020.3.1 to compile and run
- Dominant language
- Kotlin
- Stars
- 557
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/codelab-android-workmanager
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
android/codelab-android-workmanager#261 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
android/codelab-android-workmanager#324 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
All issues in android/codelab-android-workmanager
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
index-request triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Anthonyy232/Paperize#614 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
🌑 nextgen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CCBlueX/LiquidBounce#9214 · 1 comment ·