title: error: incompatible types: Task<Uri> cannot be converted to Uri
body: <p>I want to fetch Url of the Image that I have uploaded in the Firebase. To fetch the Image I need to have the <code>Url</code> of the specific Image. But there's is problem occurring in the fetching. The Output box shows the following:</p>
  
  <blockquote>
    <p>error: incompatible types: Task cannot be converted to Uri</p>
  </blockquote>
  
  <p>If I use <code>Task&lt;Uri&gt;</code> the image url become different. As compare to Uri.</p>
  
  <pre><code>  private void startPosting() {
      if (filePath != null) {
          final ProgressDialog progressDialog = new ProgressDialog(this);
          progressDialog.setTitle("Uploading...");
          progressDialog.show();
  
          final StorageReference ref = mStorage.child("Quote_Image" + UUID.randomUUID().toString());
          ref.putFile(filePath)
                  .addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
  
                      @Override
                      public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                          progressDialog.dismiss();
                          Toast.makeText(adminUpdateQuotesSend.this , "Uploaded" , Toast.LENGTH_SHORT).show();
                          mDatbase = FirebaseDatabase.getInstance().getReference().child("Quotes");
                          DatabaseReference newPost = mDatbase.push();
                          Uri down=ref.getDownloadUrl();
                              Uri dow=down;
                          newPost.child("ImageUrl").setValue(ref.getDownloadUrl());
                         // newPost.child("Positivity").setValue(PositiveDesc);
                      }
                  })
                  .addOnProgressListener(new OnProgressListener&lt;UploadTask.TaskSnapshot&gt;() {
                      @Override
                      public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
                          double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot
                                  .getTotalByteCount());
                          progressDialog.setMessage("Uploaded " + (int) progress + "%");
  
                      }
                  });
  
      }
  }
  </code></pre>
  
  <p>The error is flashing on this line of code: </p>
  
  <pre><code>Uri down=ref.getDownloadUrl();
  </code></pre>