0

I would like to load an url that contains an image to a notification (using picasso library) and as callback i would like to load another image if occurs an error. I found to code for this without callback.

Picasso.with(context).load(url).into(remoteViews, R.id.image, notificationID, notification);

1 Answers1

1

If the code will not run on UI Thread.You can do like following:

Bitmap bitmap = Picasso.with(context).load(url).get();
ImageView imageView = (ImageView) remoteViews.findById(R.id.image);
imageView.setImageBitmap(bitmap);
nshmura
  • 5,940
  • 3
  • 27
  • 46