I am new to android and I want to download an image from an url without extension '.jpg' or '.png' and etc ... Examples of this URL. Then I want to show it in an imageView.
Please help me. A big thanks for your help.
I am new to android and I want to download an image from an url without extension '.jpg' or '.png' and etc ... Examples of this URL. Then I want to show it in an imageView.
Please help me. A big thanks for your help.
You can use Picasso.
Example:
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
The way your question is phrased makes it sound like you don't have access to a direct link to an image and need to extract it from a webpage. There is no built-in way to do this in Android (to my knowledge).
You could create your own algorithm that processes the source code of the web page and returns any URLs that end in .jpg
, .png
, or any other image extension you need. From there you would follow something like this to download the images into ImageView
objects.