0

For some reason d=null when creating a drawable from coverArtURLStr, which is the full http path to the resource on the LAN. Anything obvious wrong? It's a path to a .png [I can access the LAN OK, and Data.defaultCoverArt works fine]

public static void updateCoverArt(String coverArtURLStr)
{
    String coverArtURL = coverArtURLStr;
    Drawable d;

    if (coverArtURL.equals(""))
        d = Data.defaultCoverArt;
    else           
        d = Drawable.createFromPath(coverArtURL);

    Data.coverArtIV.setImageDrawable(d);
}

1 Answers1

0

I don't think Drawable.createFromPath() method can handle URLs. Try this solution Android Drawable Images from URL.

Community
  • 1
  • 1
Michael
  • 53,859
  • 22
  • 133
  • 139