0

I´m using notifications for the androidwear watch in my project. My intentention is that the background of the notificatión will be an image extract from a url, but i don´t know how to do it.

The doc of the NotificationCompat.WearableExtender()explain:

.setBackground(bBitmap);

but.. if i want to load the backgroud from a url?

i´ll be reading about this, but without success.

Thanks in advance.

Sergio76
  • 3,835
  • 16
  • 61
  • 88

1 Answers1

0

Use Volley (Highly efficient networking library) to download the image in URL and use it. You will get a bitmap response. There are various tutorials for Volley ImageRequest.

See this question Import Android volley to Android Studio to see how to add volley library to android-studio

Try this to learn to requst images from url using volley.

https://developer.android.com/training/volley/request.html

if u still cant't do it, i can help u with the code. Happy coding :)

Community
  • 1
  • 1
Vivek Av
  • 69
  • 11