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

[BUG] Camera button does not work for devices targeting Android 11 #224

Open
NickalasB opened this issue Oct 26, 2020 · 5 comments
Open
Labels

Comments

@NickalasB
Copy link
Contributor

Describe the bug
The camera button is unresponsive on devices targeting Android 11 (API 30).

To Reproduce
Steps to reproduce the behavior:

  1. Update the targetSdkand compileSdk to 30 in the sample app
  2. Address the compile errors around arrayLists
-                path = data!!.getParcelableArrayListExtra(FishBun.INTENT_PATH)
+                path = data?.getParcelableArrayListExtra(FishBun.INTENT_PATH) ?: arrayListOf()
  1. Launch the sample app
  2. Click on ACTIVITY IN STARTACTIVITYFORRESULT(DARK)
  3. Click the + button
  4. Click an album
  5. Click on the camera

Expected behavior
The device should ask for camera permission and then launch the camera, where the user can take a photo that will be added to the selected album.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [Pixel3]
  • OS: [Android 11]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
This issue was actually exposed when trying to upgrade our Flutter app that uses the Flutter multi_image_picker plugin.

@NickalasB NickalasB added the bug label Oct 26, 2020
@NickalasB NickalasB changed the title [BUG] Camera button does not work for devices using Android 11 [BUG] Camera button does not work for devices targeting Android 11 Nov 3, 2020
@Yunus0or1
Copy link

When will we get update please? Can not launch camera on API level 30.

@JarvanMo
Copy link
Contributor

Same issue here.

@Yunus0or1
Copy link

Add this in your AndroidManifest.xml

android:requestLegacyExternalStorage="true"  in application tag

@JarvanMo
Copy link
Contributor

thanks

@angelkoh
Copy link

based on https://stackoverflow.com/a/64204646/908821
add the following to your manifest

<queries>
    <!-- Camera -->
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent> 
</queries>

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

No branches or pull requests

4 participants