I was trying to set my widget's image view with contact's thumbnail. I was trying with activity's image view and I was able to get the thumbnail but when I tried to get the same with setImageViewUri in RemoteViews,its not updating my widget's image view.I have posted my code snippet below..
ImageView mine = (ImageView) findViewById(R.id.pickcontact);
if (phone_thumbnail != null) {
mine.setImageURI(Uri.parse(phone_thumbnail));
Log.d("Pick", "Image is set");
}
this code is working fine.
RemoteViews views = new RemoteViews(getPackageName(),
R.layout.widget_alyout);
if (phone_thumbnail != null) {
views.setImageViewUri(R.id.widget_icon_imageview,
Uri.parse(phone_thumbnail));
} else {
views.setImageViewResource(R.id.widget_icon_imageview,
R.drawable.image);
}
this code is not working.both setImageViewUri and setImageViewResource not updating my widget's imageview.Any idea? please help. Thanks, Jeyanthi