Camera does not start on Pixel 4 with 1.8 but with 1.7.5
WarrenFaith opened this issue · 5 comments
WarrenFaith commented
I used the lib successfully and wanted to update from 1.7.5 to 1.8.
On my Pixel 4 Android 11, the camery/galery dialog is still working but when I press camera, the dialog disappears and nothing happens.
Device was restarted to prevent issues with the camera. Downgrade to 1.7.5 made it work again. No error message, no log output that I could identify to be related.
The calling code I used didn't change and is rather simple:
ImagePicker.with(this) // this being a fragment
.compress(INCIDENT_IMAGE_MAX_SIZE_KB)
.maxResultSize(INCIDENT_IMAGE_WIDTH, INCIDENT_IMAGE_HEIGHT)
.galleryMimeTypes(arrayOf("image/png", "image/jpeg", "image/jpg"))
.start { resultCode, data ->
viewModel.handleImagePicker(resultCode, data)
}
janakspaceo commented
same here
Dhaval2404 commented
Duplicate of #146
WarrenFaith commented
Dhaval2404 commented
@WarrenFaith sorry for wrong tag, Can you please add queries into your AndroidManifest.xml
<manifest package="com.github.dhaval2404.imagepicker">
<application>
</application>
<queries>
<!-- Camera -->
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
</manifest>
WarrenFaith commented
Indeed, that solved it! Thank you!
Also mentioned as a solution in #143