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

Camera does not start on Pixel 4 with 1.8 but with 1.7.5 #162

Closed
WarrenFaith opened this issue Feb 15, 2021 · 5 comments
Closed

Camera does not start on Pixel 4 with 1.8 but with 1.7.5 #162

WarrenFaith opened this issue Feb 15, 2021 · 5 comments

Comments

@WarrenFaith
Copy link

WarrenFaith commented Feb 15, 2021

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
Copy link

same here

@Dhaval2404
Copy link
Owner

Duplicate of #146

@Dhaval2404 Dhaval2404 marked this as a duplicate of #146 Feb 17, 2021
@WarrenFaith
Copy link
Author

You sure? There is literally no clue what and why it happened with #146
I literally told you that a working simple usage is breaking after updating to the latest version.
#146 could also just be an error unrelated to your library.

@Dhaval2404
Copy link
Owner

Dhaval2404 commented Feb 17, 2021

@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
Copy link
Author

Indeed, that solved it! Thank you!
Also mentioned as a solution in #143

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

3 participants