Retrieve an image in the Firebase Storage and display in the app using GLIDE

0
I'm trying to retrieve a Storage from Firebase using Glide , I searched in many places, I used the code the way I walked seeing and yet I could not recover the image at all. In the appendix shows how I wanted it to be, the first image shows how it should be, these images are in the app itself, then the next image shows how it is getting, I removed the image from the calendar to try to recover by firebase but I could not. Below is the code and the images

public class MainActivity extends AppCompatActivity {
    private ImageView proximaAcao;
    private ImageView galeria;
    private ImageView calendario;
    private ImageView contatos;



@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    proximaAcao = (ImageView) findViewById(R.id.proxima_acao_id);
    galeria = (ImageView) findViewById(R.id.galeria_id);
    calendario = (ImageView) findViewById(R.id.calendario_id);
    contatos = (ImageView) findViewById(R.id.contatos_id);


    Glide.with(MainActivity.this).load("gs://doe-amor.appspot.com/calendario_app.png");

I've already put the correct dependencies in the grid and nothing, could anyone help me?

    
asked by anonymous 18.05.2018 / 21:51

1 answer

0

This is because you are using the wrong URL. With this URL you only have access to the image.

Go to the Firebase console , and find the image in Storage and click "Generate Download URL", a URL will be generated to download the image (starting with "https"). Use this URL in Glide and your image will load without any problems.

    
20.05.2018 / 16:21