Download photo URL without file name

-1

I use to download files and photos from Glide or Retrofit but have never come across the need I'm having right now. The url is type link

the number is the user id and qrcode is where the qrcode image file is generated by the server, when I put this URL in the browser it downloads the normal image like any file being downloaded by the browser but inside Android I know how I do it with Glide or Retrofit.

    
asked by anonymous 25.09.2018 / 22:41

1 answer

0

Glide and retrofit are libraries, in short, for different purposes. With the retrofit you will go to the server and get the path of the image or until you download the file.

link

Using this library, you can bring the path where your image is, as stated in your question. When you bring the URL, use glide to display it in your imageView.

@Override public void onCreate(Bundle savedInstanceState) {
  ...
  ImageView imageView = (ImageView) findViewById(R.id.my_image_view);

  GlideApp.with(this).load("http://suaurl").into(imageView);
}

link

    
26.09.2018 / 15:34