retrieve the URL images from SQlite - java

When retrieve the images from Firebase to SQlite it comes as link, so I am trying now to show the images through Picasso as the following:
Picasso.with(context).load(favoritesList.get(position).getFoodImage())
.into(viewHolder.food_image);
but the image not showing. How can I do it?

The first check value of this favoritesList.get(position).getFoodImage(), if not null, paste url to browser and see result. Check your image in xml file and maybe Picasso library error, because in one of my project, Picasso not working but when I using Glide, it's work fine, and i don't understand why :D. BTW you should set placeholder for image.

Related

which the easiest way to donwload an image from sql and import to imageView?

as mentioned in the title, which is the easiest way to retrieve an image from sql and show it on image view?
I'm really new into Android world and I would like to achieve something without copy and paste other's code.
the images are stored in the sql as url in the webserver and not ad blob file.
What do you think about it?
thank you in advance!
Picasso is a great and simple library that can help you download/cache and manipulate images on android

How to cache image downloaded from URL in Java?

I have downloaded an image from a URL using ImageIO.write, so now I am wondering if there was a possibility of somehow caching that image. Is there a possibility to compare the downloaded image with the URL it's downloaded from to know that the image is from that URL? I need this because if I download an image and than later call that same URL for downloading, my app can recognize that it already has the image downloaded, so it doesn't download it again.
You should try to see if you can integrate the code to upload the picture to google and search by image. Or, you can also save the url of the image with an array while storing the image if you have multiple images you want to download at once.

How to Get Image Path in my App which is Selected from Whats app's Chat?

i have demo application with image view and in this image view i need to set image from which selected from whats app Chat,
Currently i was getting Path of selected image i.e. content://com.whatsapp.provider.media/item/245429
Does any idea to resolve this ?
Thank You in Advance.
There is no image path, as there is no requirement that this Uri point to a file, let alone point to a file that you have direct filesystem access to.
Use an image-loading library (e.g., Glide, Picasso) and provide it the Uri that you get from WhatsApp. Those libraries know how to use ContentResolver and openInputStream() to read in the bytes associated with that content, convert those bytes into a Bitmap using BitmapFactory.decodeStream(), and put the Bitmap into your ImageView.

Get bitmap of the image from browsers

I am trying to get the bitmap of the image which i am viewing in browser. is it possible to get those bitmap values from any of contentProvider. Pl suggest me how to do this. Thanks in advance.
You can use a crawler to get the web-page contents, like Jsoup, then find the image url & either download its bitmap with Glide library or directly load it into a ImageView (using Glide again).

Retrieve an image from my database sqlite

I store images type TEXT which contains the URL of this image in my SQLite database, I want to get in my application in android these images and then display it on buttons
i just want to know how can i do it, some suggestion please
Since you fist need to download the images, I suggest you google for something like "android load images" or "android download images". You will find many good tutorials and libraries.

Categories

Resources