I made my own rest api and now it just has endpoint where I show some images. Here how it looks in spring boot application
@GetMapping(\"/image/{name:.+}\")
If you are targeting API 28 on and the issue appears on Android 9 and the URL starting with http
your issue is with cleartext traffic
as mentioned here in Network security configuration
Starting with Android 9.0 (API level 28), cleartext support is disabled by default.
ensure that all connections to are always done over HTTPS to protect sensitive traffic from hostile networks.
If you want to Opt out of cleartext traffic
Add this property on your application manifests only
<application
.
android:usesCleartextTraffic="true"
.
>
</application>
And if you want to have specific domains to have the rule
Create file res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">secure.example.com</domain>
</domain-config>
</network-security-config>
AndroidManifest.xml -
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />
<application
...
android:networkSecurityConfig="@xml/network_security_config"
...>
...
</application>
</manifest>
Add to gradle annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
in my case i just put my link inside string variable
String link = "http://myipaddress/api/image/myimage.jpg";
Glide.with(context).load(link).into(img);
and problem solve!