Load Image from Firebase Storage with Picasso to ImageView in Infowindow, Picasso only shows placeholder
<p>I try to load a image from my Firebase Storage with Picasso into an Imageview that is placed in a InfoWindowAdapter from a Marker.</p>

<p>I'm very desperate about it. The problem is Picasso only shows the placeholder Icon.</p>

<p>My code for the <code>FirebaseStorageRefernce</code> looks like this referring to this <a href="https://firebase.googleblog.com/2016/07/5-tips-for-firebase-storage.html" rel="nofollow noreferrer">Firebase Blog post</a>:</p>

<pre><code> StorageReference load = getImage(id);

 load.getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {
     @Override
     public void onSuccess(Uri uri) {

         downloadUri = uri;

     }
 }).addOnFailureListener(new OnFailureListener() {
     @Override
     public void onFailure(@NonNull Exception e) {
         Log.e("Failure",e.toString());
     }
 });
</code></pre>

<p>The downloadUri that I get is valid and works fine. Now I use this downloadUri for Picasso.</p>

<pre><code> Picasso picasso = new Picasso.Builder(getApplicationContext()).listener(new Picasso.Listener() {
    @Override
    public void onImageLoadFailed(Picasso picasso, Uri uri, Exception e) {
        e.printStackTrace();
    }
}).build();
picasso.setLoggingEnabled(true);
picasso.load(downloadUri).placeholder(R.drawable.toxic_bait_icon).fit().into(thump, new MarkerCallback(marker));
</code></pre>

<p>In reference to an <a href="https://stackoverflow.com/a/28885430">answer</a> that I found here on StackOverFlow, I made a MarkerCallback Class:</p>

<pre><code>public class MarkerCallback implements Callback {

com.google.android.gms.maps.model.Marker marker = null;


MarkerCallback(Marker marker)
{

    this.marker = marker;

}


@Override
public void onError(){
    Log.e(getClass().getSimpleName(), "Error loading thumbnail!");
}

@Override
public void onSuccess(){
    Log.d("onSuccess","Picasso Callback");
    if(marker != null &amp;&amp; marker.isInfoWindowShown()){

        Log.d("onSuccess","Picasso Callback in if");
        marker.hideInfoWindow();
        marker.showInfoWindow();

    }
}}
</code></pre>

<p>You can see that I added some <code>Log.d</code> messages on the <code>onSuccess</code> method to track if it's called. But it looks like the <code>onSucess</code> method isn't  called anytime because the <code>Log.d</code> message never appears in LogCat. </p>

<p>Also Picasso doesn't show any exception, errors, failures, nor a log even though I enabled it. </p>

<pre><code>picasso.setLoggingEnabled(true);
</code></pre>

<p>The only thing that happens is that the ImageView in the Infowindow shows the Placeholder.</p>

<p>I thought maybe its because the image size too large to load, but the image I try to load is only 652.86 KB. </p>

<p>PS: Picasso also doesn't show the ribbons in the left corner to debug the cache behaviour. I try to activate with:</p>

<pre><code>picasso.setIndicatorsEnabled(true);
</code></pre>

<p>I use Picasso 2.5.2. I have no idea what I'm doing wrong or how to debug this if Picasso doesn't show logs nor ribbons. I hope someone can help me. I need this feature so badly.</p>

<p>Addendum:
I have also check the permissions, referring to this <a href="https://stackoverflow.com/questions/25782224/android-picasso-shows-only-placeholder-not-the-image-from-url">post</a>, they are OK.</p>

<pre><code> &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
&lt;uses-permission
    android:name="android.permission.INTERNET"/&gt;
&lt;uses-permission
    android:name="android.permission.READ_SYNC_SETTINGS"/&gt;
&lt;uses-permission
    android:name="android.permission.WRITE_SYNC_SETTINGS"/&gt;
&lt;uses-permission
    android:name="android.permission.AUTHENTICATE_ACCOUNTS"/&gt;
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
&lt;uses-permission android:name="android.permission.CALL_PHONE" /&gt;
&lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
&lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
</code></pre>

<p><strong>Update</strong></p>

<p>After some trial-and-error, I found out that Picasso shows the log, but i don't see it in logcat. After I restart my phone, I saw the log in the logcat after a while. The log disappears again, but this time even a restart doesn't help the, log doesn't reappear.</p>

<p>But I've also done some research and found another <a href="https://stackoverflow.com/questions/32725753/picasso-image-loading-issue-in-googlemap-infowindowadapter?rq=1">answer</a> that refers to my problem.</p>

<p>So I changed my code but it doesn't help. The issue is still the same. Picasso shows only the placeholder.</p>