Uri downloaduri=taskSnapshot.getDownloadUrl();//here i cant use getdownloadurl() function
DatabaseReference new_prod=db.push();
Below method worked for me.
_fbs_upload_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(UploadTask.TaskSnapshot _param1) {
Task urlTask = _param1.getStorage().getDownloadUrl();
while (!urlTask.isSuccessful());
Uri downloadUrl = urlTask.getResult();
String _downloadUrl = downloadUrl.toString();
};