fix: Catch insufficient-storage
errors (#2422)
* fix: Catch `insufficient-storage` errors * feat: Implement `insufficient-storage` error for Android * fix: Catch insufficient storage error also on takePhoto android
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.mrousavy.camera.utils
|
||||
|
||||
import android.content.Context
|
||||
import java.io.File
|
||||
|
||||
class FileUtils {
|
||||
companion object {
|
||||
fun createTempFile(context: Context, extension: String): File =
|
||||
File.createTempFile("mrousavy", extension, context.cacheDir).also {
|
||||
it.deleteOnExit()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user