2

The following 3 methods (from RemoteViews class) can be used to update an image on a Home Screen widget, on Android:

setImageViewResource (int viewId, int srcId)
setImageViewUri (int viewId, Uri uri)
setImageViewBitmap (int viewId, Bitmap bitmap)

But after lot of research, I found that setImageViewUri() is the best one to use, to avoid the error "**!!! FAILED BINDER TRANSACTION !!!**" that can happen when updating the widget. But why is this the case? I couldn't find any proper reason or JavaDoc documentation.

Community
  • 1
  • 1
Shakeeb Ayaz
  • 6,200
  • 6
  • 45
  • 64

1 Answers1

1

Some people recommend using setImageViewUri() to reduce the risk of freezing the widgets on the Home Screen. See https://code.google.com/p/android/issues/detail?id=28216#c102