Reputation: 141
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);
Upvotes: 0
Views: 2019
Reputation: 6000
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);
Upvotes: 1