0

I'm attempting to use Picasso to load an ImageView from a URL - however the imageView never seems to populate with the image and I am unsure why.

P.S.

When debugging - the value of 'boxart' is a valid image URL each and every time - so I'm pretty stumped.

Source:

...

Bundle extras = getIntent().getExtras();
    if (extras != null) {
        String boxart = extras.getString("boxart");
        Picasso.with(this).load(boxart).into(imageItem);

...

Also - I'm not getting any errors - it simply does not load the image.

Jackie Deezner
  • 217
  • 3
  • 12

2 Answers2

0

Try installing an error handler and see if that gets called (you set this global listener on your Picasso.Builder:

public class MyClass implements Picasso.Listener {
    @Override
    public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {
        // Display the exception
    }
}

Full answer: https://stackoverflow.com/a/27798536/1715829

Community
  • 1
  • 1
Buddy
  • 10,874
  • 5
  • 41
  • 58
0

Make sure you have the correct permissions:

<uses-permission android:name="android.permission.INTERNET" /> 

ex.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.alefba.app.cus.eLearning"
    android:installLocation="auto">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        ...
    </application>

</manifest>

Also, make sure your device is connected to a network.

  • be sure the link is direct
Misagh
  • 3,403
  • 1
  • 20
  • 17