Q:

Download multiple files with Firebase

im trying to get 2 files from my firebase storage, they are in a folder called Ara , so the files there are 2  xxx.txt and yyy.txt  (lets call them this way)
so for testing i just run this method
 private void traerPictosFirebase(){

        File localFile = null;
        try {
            localFile = File.createTempFile("xxx","txt");
        } catch (IOException e) {
            e.printStackTrace();
        }

        mStorageRef.child("Archivos_Paises/Ara").getFile(localFile).addOnSuccessListener(new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
            @Override
            public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {

//here i want to know if i downloaded succefully the file and find the path of it

            }
        }).addOnFailureListener(new OnFailureListener() {
            @Override
            public void onFailure(@NonNull Exception e) {

            }
        });

    }

So, now i want to do 2 things, first one is how i know if the file was downloaded to my device, in the onSuccess and second i want to donwload the two files, not just one
thanks

A:

The fact that the onSuccess() callback was even invoked indicates that the file was successfully downloaded.  You don't need any other confirmation.
If you want to download two files, then you'll need to make two calls to getFile() and deal with both of their tasks.

