Comments (3)
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.
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.
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 asNSURL
on #71 .
Yup for sure
from kamel.
Related Issues (20)
- Persistent cache is not working HOT 2
- Bug: animation triggers every time the loading progress changes HOT 1
- Disk cache doesn't work on iOS and Android HOT 4
- Can't load images from disk cache when offline HOT 1
- Base64 Encoded Images HOT 3
- 1.0.0-beta.6 compatibility with latest stable Ktor HOT 3
- iOS-only: `IrCallImpl: 1` compilation error when passing a Kamel `File` to `asyncPainterResource` with Kotlin 2.0.0 HOT 6
- Duplicate class co.touchlab.stately.collections.FunctionsKt HOT 5
- How to load image bitmap? HOT 31
- Add wasmJS target HOT 7
- how to skip memory cache in kamel HOT 1
- File URLs should be handled as such on JVM platform HOT 16
- Make heavyweight dependencies optional HOT 3
- Problem with SVG on iOS HOT 1
- Expand onSuccess to function parameter HOT 2
- KamelImage fills up max size HOT 5
- Is it possible to have access to the image Height when the resource state is Loading or Error? HOT 3
- KamelConfig.Default does not load automatically with v1 beta HOT 17
- Support compose multiplatform for kotlin/JS [1.6.0] HOT 2
- Ability to trigger reload on loading failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kamel.