Right now I am using Glide-library
to load the image in Android Wear. It doesn't load the image in most of the times. However, it loads image sometimes. Don't know what going wrong in my code.
Note Wear is connected to the device via Bluetooth and I successfully get JSON
response of Webservice in Android Wear via Broadcast Receiver
from mobile. All data are displayed properly in wear except the images.
Glide.with(mContext)
.load("http://www.hanamoflorist.ca/images/uploads/Spring5InchesCubeVaseArrangement$45.00.jpg")
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {
Log.e("exception in image", "" + e);
Toast.makeText(mContext, "" + e, Toast.LENGTH_LONG).show();
return false;
}
@Override
public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
return false;
}
}).error(R.drawable.ic_placeholder_image)
.into(((ItemViewHolder) holder).ivCardImage);