Git Product home page Git Product logo

Comments (7)

nipuncs avatar nipuncs commented on June 1, 2024 1

The issue is still there on some mobile phones. Only for downloaded images.

  • v1.7.1
  • Nokia 2 (Android 9)

Stack trace
E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/Download/image-1.jpg (No such file or directory)

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65560, result=-1, data=Intent { dat=file:///storage/emulated/0/Download/image-1.jpg (has extras) }} to activity

Code

         ImagePicker.with(this)
            .compress(1024)
            .start { resultCode, data ->
                if (resultCode == Activity.RESULT_OK) {
                    try {
                        val file = ImagePicker.getFile(data)
                        if (file != null) {
                            val bitmap = BitmapFactory.decodeFile(file.absolutePath)
                            //Do my work
                        }
                    } catch (e: Exception) {
                       //Show Error
                    }
                } else {
                    //Show Error
                }
            }

from imagepicker.

Dhaval2404 avatar Dhaval2404 commented on June 1, 2024

@vkfan Which version you are currently using?

from imagepicker.

vkfan avatar vkfan commented on June 1, 2024

@vkfan Which version you are currently using?

support 1.3, the issue is when I try to choose images from downloads folder.

from imagepicker.

Dhaval2404 avatar Dhaval2404 commented on June 1, 2024

@vkfan Can you please try out the latest version.

from imagepicker.

Dhaval2404 avatar Dhaval2404 commented on June 1, 2024

The issue has been resolved on v1.4

from imagepicker.

tgbmoseswebb avatar tgbmoseswebb commented on June 1, 2024

I am getting the same issue as well on some devices. Only causes issues when picking images from the "Download" folder.

-Samsung A10
-1.7.1

ImagePicker.with(this)
.start { resultCode, data ->
if (resultCode == Activity.RESULT_OK) {
//continued work
} else if (resultCode == ImagePicker.RESULT_ERROR) {
//error
}
}

from imagepicker.

tushar-misfit avatar tushar-misfit commented on June 1, 2024

I am also getting the error. Is it solved? I am using version 2.1

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.