June 2018
Beginner to intermediate
394 pages
9h 2m
English
Firebase storage can store file content and file metadata, which contains properties such as the content type and timestamp of the file created in Firebase storage. Using getMetadata() on the storage reference instance, we can retrieve the metadata of the file:
StorageReference storageRef = storage.getReference();StorageReference forestRef = storageRef.child("images/forest.jpg");forestRef.getMetadata().addOnSuccessListener(new OnSuccessListener<StorageMetadata>() { @Override public void onSuccess(StorageMetadata storageMetadata) { }}).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { }});
This code retrieves the metadata of the file with success and failure ...
Read now
Unlock full access