此getDownloadUrl()方法在更新后显示已弃用
'com.google.firebase:火力存储:15.0.2'
官方网站上没有任何东西可以通过另一种方式来实现网址,那么有什么办法以非弃用的方式实现网址?
/** @deprecated */
@Deprecated
@Nullable
public Uri getDownloadUrl() {
StorageMetadata var1;
return (var1 = this.getMetadata()) != null ? var1.getDownloadUrl() : null;
}
}
Run Code Online (Sandbox Code Playgroud) Uri downloaduri=taskSnapshot.getDownloadUrl();//here i cant use getdownloadurl() function
DatabaseReference new_prod=db.push();
new_prod.child("product name").setValue(prod_name);
new_prod.child("product price").setValue(prod_price);
new_prod.child("available stock").setValue(prod_quan);
new_prod.child("product image").setValue(downloaduri);
pd.dismiss();//fragments code
Run Code Online (Sandbox Code Playgroud)
我无法使用getdownloadurl。我已经将图像存储在Firebase存储器中了吗?这是限制使用getdownloadurl的片段吗?我的动机是要进行查询以存储在firebase中。请帮助我。
android firebase firebase-realtime-database firebase-storage