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 doesn't show #143

Closed
krajzler opened this issue Dec 23, 2020 · 8 comments
Closed

Camera doesn't show #143

krajzler opened this issue Dec 23, 2020 · 8 comments
Labels
waiting for user response Team cannot make further progress on this issue until the original reporter responds.

Comments

@krajzler
Copy link

krajzler commented Dec 23, 2020

If I want to select image from camera, nothing happens. I tried on two different ways:

ImagePicker.with(this)
        .crop()
        .start()

Nothing happens if I click on Camera button. And:

ImagePicker.with(this)
        .crop()
        .cameraOnly()
        .start()

Nothing happens at all. There is also nothing in logs.

I'm using Google Pixel 3 Android 11 (API 30).

@Dhaval2404
Copy link
Owner

@krajzler Thank you so much for reporting the issue.

Today, I've tried to reproduce the issue using the given code but it seems to be working fine on my end. Here is the video for reference: Sample Emulator Video and Sample Pixel 4a Video

Gradle:

implementation 'com.github.dhaval2404:imagepicker:1.8'

Sample Code:

ImagePicker.with(this)
            .crop()
            .cameraOnly()
            .start()

Device Tested: Pixel 2 API 30 (Emulator) and Pixel 4a API 30 (Real Device)

It would be a great help to me if you can provide any steps with which I can reproduce the issue. Looking forward to your reply.

@Dhaval2404 Dhaval2404 added the waiting for user response Team cannot make further progress on this issue until the original reporter responds. label Dec 24, 2020
@odolejsi
Copy link

odolejsi commented Dec 29, 2020

I just ran into this as well after updating to 1.8 (to fix the crash with uCrop on super high resolution phones).
The error coming from ImagePicker is:

java.lang.Throwable: Camera app not found

I also had ImagePicker request the camera permissions itself... is it possible that the check for existence of camera app returns null before permissions are granted? d26715d#diff-bf5de81807b1b0ec03a274ef62f61843f9cc14fafdadac5452d371c62a550f06R85

@nothingimportant55
Copy link

nothingimportant55 commented Jan 1, 2021

Same issue here. Pixel 2, API 30. Camera doesn't appear. I am seeing this in LogCat:

I/AppsFilter: interaction: PackageSetting{dba135d com.xxxxx/10589} -> PackageSetting{539b5ad com.google.android.GoogleCamera/10082} BLOCKED

@Dhaval2404
Copy link
Owner

@krajzler @nothingimportant55

I found that the Checking Camera App Existing or not is not working in an app that targets API 30 (targetSdkVersion 30). It is due to the package-visibility introduced in API 30. I'm working on a possible solution. Hopefully, I will release the updated version by EOD.

Thank you so much for your feedback,

@Dhaval2404
Copy link
Owner

For an immediate solution, 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>

@sagarkokare
Copy link

If I want to select image from camera, nothing happens.gallery working fine

Dhaval2404 added a commit that referenced this issue May 15, 2021
@Dhaval2404
Copy link
Owner

This issue is resolved in v2.0

@VosoUser
Copy link

i want front camera open. in camera choose camera method needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for user response Team cannot make further progress on this issue until the original reporter responds.
Projects
None yet
Development

No branches or pull requests

6 participants