title: Android. How to download image from Firebase and set it like background
body: <p>I recently got acquainted with Firebase.</p>
  
  <p><strong>Task: download an image from the Firebase repository and set it as the background image.</strong></p>
  
  <p>I managed to download the image. I do this with this code:</p>
  
  <pre><code>        FirebaseStorage storage = FirebaseStorage.getInstance();
  
          StorageReference storageRef = storage.getReferenceFromUrl("gs://my bucket name");
  
          StorageReference pathReference = storageRef.child("image/20170703_142533.jpg");
  
          File localFile = null;
          try {
              localFile = File.createTempFile("images", "jpg");
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          pathReference.getFile(localFile).addOnSuccessListener(new OnSuccessListener&lt;FileDownloadTask.TaskSnapshot&gt;() {
              @Override
              public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) 
              {
                  Log.d("TAG_LOG", "Downloaded"); 
              }
          }).addOnFailureListener(new OnFailureListener() {
              @Override
              public void onFailure(@NonNull Exception exception) 
              {
                  Log.d("TAG_LOG", "Error"); 
              }
          });
  </code></pre>
  
  <p>Proceeding from the fact that the logs are written <code>Downloaded</code>, I understand that everything works.</p>
  
  <p>But <strong>where this file was downloaded and how to install it as a background image I do not understand.</strong> </p>
  
  <p>Sorry for my mistakes in text if you found it, English not my national language. I hope i wrote understandable. I count on your help.</p>