Code Monkey home page Code Monkey logo

Comments (3)

iruizmar avatar iruizmar commented on August 18, 2024 1

Hey @luca992, I think this one would be doable with mappers too once we address #70 since android.net.Uri could either be a local file or a remote uri too, just as NSURL on #71 .

from kamel.

luca992 avatar luca992 commented on August 18, 2024

Sounds like it could be a good feature to add. I don't really have time to look into this atm, but if you want to do a pr, context is now injected into kamel-core here. Or LocalContext.current possibly could be used as well...

I believe it could be implemented as a new type of fetcher: Fetcher<android.net.Uri>. For example this is the HttpFetcher.

Basically Fetcher<android.net.Uri> just specifies a data source type android.net.Uri in this case and fetches bytes bytes from it.

Also, fyi Fetcher is an interface you can implement in your own app and add to your own KamelConfig without having to make a PR here. But if you do implement it and want to share, please do. PR's are always welcome!

In some cases on android your could probably just accomplish this as well with a mapper... if you can actually get a real file path from android.net.Uri ... but I know in many cases android's Storage Access Framework (which is difficult to say the least) prevents you from doing anything but reading the bytes. In which case a Fetcher would be the way to go.

from kamel.

luca992 avatar luca992 commented on August 18, 2024

Hey @luca992, I think this one would be doable with mappers too once we address #70 since android.net.Uri could either be a local file or a remote uri too, just as NSURL on #71 .

Yup for sure

from kamel.

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.