android / android/codelab-android-workmanager
Use of MediaStore in SaveImageToFileWorker.kt throws an exception
- 主要言語
- Kotlin
- スター
- 557
- フォーク
- 242
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
調査の方向性
まず SaveImageToFileWorker.kt で失敗を再現して例外を取得し、次に BlurActivity の MediaStore 呼び出しと関連するフローを確認します。関連するコンテキストについて issue 259 を確認します。画像が保存され、outputImageUri に値が設定され、See File ボタンが表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, kotlin
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100