0

I have a small problem, as I could convert a url from an image to a bitmap. The url string is obtained through a json that I download with Volley, and I need that bitmap to be able to give a personalized icon to a marker.

Rafa
  • 21
  • 6
  • 1
    Stack Overflow is for programming questions. What is your question? If your question is "how do I do this?", there are many [image loading libraries available for Android](https://android-arsenal.com/tag/46), or you could just use Volley, since you are using that already. – CommonsWare Nov 17 '16 at 17:36
  • For that I ask here, because I use volley and charge images in ImageView, but I do not know how to get a Bitmap. There is my question. If you want some code I'll put it as a Sir programmer. – Rafa Nov 17 '16 at 17:43

2 Answers2

1

I think you can use Picasso Library here, and it will show the image with the given URL dynamically. There is much more benefits of using Picasso. Try that if it helps you.

And also there is no need to download the image to the user. It saves images cache to show the image if user returns in particular time-gap.

Swr7der
  • 849
  • 9
  • 28
  • I also use Picasso for some images, but I also have to load the image into an imageview, and I just need the bitmap, to add it to a marker – Rafa Nov 17 '16 at 17:46
  • If you are trying to get bitmap from url, try this. http://stackoverflow.com/a/20181629/34239320 – muthuraj Nov 17 '16 at 19:44
0

Volley supports loading images asynchronously to a bitmap.

Picasso supports loading images asynchronously to a bitmap.

Other image loading libraries may offer similar options, though since you already use Volley and Picasso, you may wish to stick with one of those.

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491