Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CameraX unable save image to internal storage #583

Open
ysavr opened this issue Jun 13, 2024 · 0 comments
Open

CameraX unable save image to internal storage #583

ysavr opened this issue Jun 13, 2024 · 0 comments

Comments

@ysavr
Copy link

ysavr commented Jun 13, 2024

Change save collection Uri to internal storage

val outputOptions = ImageCapture.OutputFileOptions.Builder(
                contentResolver,
                MediaStore.Images.Media.INTERNAL_CONTENT_URI,
                contentValues
        ).build()
Exception while executing runnable androidx.camera.core.impl.utils.executor.SequentialExecutor$1@dbeb2df (Ask Gemini)
                                                                                                 java.lang.UnsupportedOperationException: Writing to internal storage is not supported.
                                                                                                 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
                                                                                                 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
                                                                                                 	at android.content.ContentProviderProxy.insert(ContentProviderNative.java:481)
                                                                                                 	at android.content.ContentResolver.insert(ContentResolver.java:1848)
                                                                                                 	at androidx.camera.core.ImageSaver.copyTempFileToDestination(ImageSaver.java:225)
                                                                                                 	at androidx.camera.core.ImageSaver.lambda$run$0$androidx-camera-core-ImageSaver(ImageSaver.java:99)
                                                                                                 	at androidx.camera.core.ImageSaver$$ExternalSyntheticLambda2.run(Unknown Source:4)
                                                                                                 	at androidx.camera.core.impl.utils.executor.SequentialExecutor$1.run(SequentialExecutor.java:111)
                                                                                                 	at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)
                                                                                                 	at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)
                                                                                                 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                                                                                                 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                                                                                                 	at java.lang.Thread.run(Thread.java:919)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant