I am creating an application in which I added a blog area. But I want to save the thumbnails of my posts and also the html page. Here is how everything works:
If the mobile is connected to internet my app requests and gets three lists(Title, Subtitle, Thumbnail) it stores the title subtitle and the related post’s data with as dictionary using tinyDB.
But is there no option to save images or html(containing css and images) using the same way?
Thank you in advance for your help!
You didn’t save image but you can save image url in tinydb
And for html css it’s also a text than you save it also ( use inline css)
Yes, I can save html as string, but is there anyway to save images without showing them in gallery and “without creating new directories(optional)”
you just need to store the url of images in tinydb and use async image extension to show images
But I want to show them offline too.
I’m saving urls now, but I want to make it more faster even with slow internet or no internet.
Is there any way to store images as cache.
you need to download images from the url and store the file path in tinydb and then you can see them offline too
Use this extension
Today I present a new extension based on
Universal Image Loader that allows you to load and cache images.
OnLoadingStarted: Event when the loading of the image is started. The url returns the URL of the image.
OnLoadingFailed: Event when the image is failed to load. The url returns the URL of the image.
OnLoadingComplete: Event when the image is loaded. The url returns the URL of the image.
But this is used for online na?
Yes, but once the image is loaded I can store it offline without showing it in gallery
This extension load first all image online and then save it in android cache folder to load offline whe. Needed
You can use extension “image to base64”.
First encode image and save to tinydb. If you wanna use image decode text from tinydb.
I use this extension to save image from camera and convert to text(base64).
@sayidtarmizi Welcome to Kodular Community
Your answer is correct and best.
if you store/download images in your ASD (App Specific Directory) it well not show in gallery.
store it in a directory, which starts with a dot, for example
or store it in a directory of your choice but start the image name with a dot, for example
Can you explain me more with an example?
how to store images in app specific directory(what is it’s path)?
see this topic:
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.