Code Monkey home page Code Monkey logo

Comments (4)

HBiSoft avatar HBiSoft commented on July 16, 2024

The error tells you what the issue is. You cannot use a content uri like to are trying to. If you have a look at the demo project, I do the following:

    intent.setAction(Intent.ACTION_GET_CONTENT);

In your case you will have to pass :

    intent.setAction(Intent. ACTION_OPEN_DOCUMENT);

from pickit.

slonomag avatar slonomag commented on July 16, 2024

Thanks!

from pickit.

slonomag avatar slonomag commented on July 16, 2024

Hi once again!

I found an additional issue with using Uri later when you write it in database and then get it back for future usage. After saving in database you get the path with "raw%3A%2F" instead of "raw:". I downloaded your library and updated Utils.java on lines 63-65 from:

if (id.startsWith("raw:")) {
id = id.replaceFirst("raw:", "");
....

to

if (id.startsWith("raw:") || id.startsWith("raw%3A%2F")) {
id = id.replaceFirst("raw:", "");
id = id.replaceFirst("raw%3A%2F", "");
....

and all works fine now. Please update your library on github too.

Thanks!

from pickit.

HBiSoft avatar HBiSoft commented on July 16, 2024

@slonomag Thanks for this. I've made the changes and it is available in 0.1.8.

from pickit.

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.