Skip to content

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

@NickalasB

Description

@NickalasB

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions