Images not loading in android wear most of the time using Glide library.
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
I am using Glide to load image url in android devices and in android wear also. However the images load in devices properly by most of the time it doesn't and sets the error image only. I tried to register a listener for error and it gave me **Socket Timeout exception**. Even after increasing the timeout it doesn't load in android wear.
I have included glide using below dependency.
```gradle
compile 'com.github.bumptech.glide:glide:3.7.0'
```
For increasing timeout I have used okHttp:
```gradle
compile ('com.github.bumptech.glide:okhttp3-integration:1.4.0'){
exclude group: 'glide-parent'
}
```
I have **moto360 smartwatch** in which I have image loading issue.
**Glide load line in recycleview Adapter**:
```java
Glide.with(mContext)
.load(myCardModel.getFront_image_url())
.placeholder(R.drawable.ic_placeholder)
.diskCacheStrategy(DiskCacheStrategy.RESULT)
.thumbnail(0.2f)
.dontAnimate()
.listener(new RequestListener() {
@Override
public boolean onException(Exception e, String model, Target 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 target, boolean isFromMemoryCache, boolean isFirstResource) {
return false;
}
})
.error(R.drawable.ic_card_placeholder_gray)
.into(((ItemViewHolder) holder).ivCardImage);
```
Is there problem with Glide loading images in android wear or problem with the server?
Images are loading rapidly in browsers as well as in devices also.
Contributor guide
Assessment
This issue has not been assessed yet.