我正在提供上传GP3并下载它们的服务。我想知道如何下载它们(我在Android Studio使用)。这是对存储代码的上传:
private void uploadSelectedAudio(){
final ProgressDialog progressDialog = ProgressDialog.show(soundSelectBasic.this, "upload..", "Connecting", true);
FirebaseStorage storage = FirebaseStorage.getInstance();
String uniqueId=mCurrentUser.getUid();
StorageReference filePath = storage.getReferenceFromUrl("gs://my-project-2a397.appspot.com/audio/profile/UserID/" + uniqueId + ".3gp");
Uri uri = Uri.fromFile(new File(mFileName));
// Toast.makeText(soundSelectBasic.this,mFileName.toString(),Toast.LENGTH_LONG).show();
filePath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
progressDialog.dismiss();
finish();
}
});
`
如果我正确理解了您的问题,我建议您看看firebase文档https://firebase.google.com/docs/docs/storage/storage/android/download-filesete/p>