Git Product home page Git Product logo

Comments (4)

thirstycoda avatar thirstycoda commented on May 25, 2024 1

This isn't my library but I've raised a few pull requests on it recently so have become familiar with it. Hopefully I can help. Please can you provide the following information:

  • What is the value of filePath?
  • Using a breakpoint at the line "e -> showToast(R.string.iamutkarshtiwari_github_io_ananas_load_error)", what is value of e?

from ananas.

joemerritt avatar joemerritt commented on May 25, 2024

Hi I had the same issue. I used the below method to return the correct file path from the URI and load in to the intent

public String getImageFilePath(Uri uri) {

    File file = new File(uri.getPath());
    String[] filePath = file.getPath().split(":");
    String image_id = filePath[filePath.length - 1];

    Cursor cursor = getContentResolver().query(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, MediaStore.Images.Media._ID + " = ? ", new String[]{image_id}, null);
    if (cursor != null) {
        cursor.moveToFirst();
        String imagePath = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));

        cursor.close();
        return imagePath;
    }
    return null;
}

I hope this helps as it drove me up the wall

from ananas.

iamutkarshtiwari avatar iamutkarshtiwari commented on May 25, 2024

@yatinjulka95 @joemerritt I'd appreciate if you could share a log for the error so that we can resolve this from the root.

from ananas.

iamutkarshtiwari avatar iamutkarshtiwari commented on May 25, 2024

This was fixed in this commit #94
Please feel free to re-open this ticket if the issue persists.

from ananas.

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.