I am using Glide to load images from url onto an ImageView in a RecyclerView adapter. Everything works fine when a user is connected to the internet on wifi. However, when their connection is on mobile data, Glide throws an exception:
java.io.FileNotFoundException: "http://......png" at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream()
Any help would be appreciated.
I have tried using https but still the same issue persists. Also tried almost all other image loading libraries including UniversalImageLoader, Fresco, Picasso but still the same error persists
Try to put this line in
AndroidManifest.xml:Probably WiFi is working globally on device, while mobile data is some sort of custom network state. in this tutorial (at FutureStud.io) use of Glide 4.x is shown. You can check connection from there and probably advance your debugging process, although the
uses-permissionsnippet should work.