Giter Club home page Giter Club logo

Comments (11)

Drjacky avatar Drjacky commented on May 28, 2024 1

@Poonam4789

  1. Below code still works:
fun pickProfileImage(view: View) {
        ImagePicker.with(this)
            //.crop()
            //.cropOval()
            .maxResultSize(512, 512, true)
            .createIntentFromDialog { profileLauncher.launch(it) }
    }
  1. I've used below config and it worked without showing crop step:
fun pickGalleryImage(view: View) {
        galleryLauncher.launch(
            ImagePicker.with(this)
//                .crop()
                .galleryOnly()
//                .cropFreeStyle()
                .galleryMimeTypes( // no gif images at all
                    mimeTypes = arrayOf(
                        "image/png",
                        "image/jpg",
                        "image/jpeg"
                    )
                )
                .createIntent()
        )
    }

from imagepicker.

Drjacky avatar Drjacky commented on May 28, 2024

I've checked the latest version (v2.1.12) and it worked on API 30 (Android 11).
Run the sample app and let me know if it works or not.

from imagepicker.

Poonam4789 avatar Poonam4789 commented on May 28, 2024

Hello Drjacky,

Thanks It worked :)

but want to highlight two issues:

  1. Previously was using below mentioned code, to display dialog for both the options , but it was not working , created own dialog and called both intents separately then it worked.
    ImagePicker.with(this)
    //...
    .createIntentFromDialog { launcher.launch(it) }

  2. As in my project there is no requirement to crop image , so was not using crop() , but it created FileNotFoundException until i included crop() in builder.

*i think first issue is not that important but second issue can be fixed.

Thanks!!

from imagepicker.

ebaraiya avatar ebaraiya commented on May 28, 2024

@Drjacky

Getting below message in android 11
" Some permission are permanently denied which are required to perform this operation. Please open app settings to grant these permissions."

from imagepicker.

Drjacky avatar Drjacky commented on May 28, 2024

@ebaraiya Screenshot, please.

from imagepicker.

ebaraiya avatar ebaraiya commented on May 28, 2024

from imagepicker.

Drjacky avatar Drjacky commented on May 28, 2024

@ebaraiya Do you use https://github.com/QuickPermissions/QuickPermissions-Kotlin?

from imagepicker.

ebaraiya avatar ebaraiya commented on May 28, 2024

Yes, I am using it.

from imagepicker.

Drjacky avatar Drjacky commented on May 28, 2024

@ebaraiya Yup, it's that
https://github.com/QuickPermissions/QuickPermissions-Kotlin/blob/2cc50df62f04a4d97e21b15f51b34acc3666ef75/quickpermissions-kotlin/src/main/java/com/livinglifetechway/quickpermissions_kotlin/PermissionsManager.kt#L135

Nothing to do with ImagePicker library.

from imagepicker.

ebaraiya avatar ebaraiya commented on May 28, 2024

If We are using the below library then working fine

implementation 'com.github.dhaval2404:imagepicker:1.5'
implementation 'com.github.florent37:inline-activity-result-kotlin:1.0.1'

from imagepicker.

Drjacky avatar Drjacky commented on May 28, 2024

@ebaraiya That library and version has issue with Android API 28 and above + to be published on Play Store (https://developer.android.com/about/versions/11/privacy/storage)

from imagepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.