使用.getDownloadUrl()方法将图像的链接保存在Firebase数据库中时出现错误。
if(task.isSuccessful())
{
sendUserToMainActivity();
Toast.makeText(SettingsActivity.this,"Profile Updated Successfully...",Toast.LENGTH_SHORT).show();
final String downloadUrl=task.getResult().getDownloadUrl().toString();
}
else //in case of any error
{
String message=task.getException().toString();
Toast.makeText(SettingsActivity.this,"Error: "+message,Toast.LENGTH_SHORT).show();
}