Created
November 15, 2017 21:30
-
-
Save gguuss/158e7ba67d1077db50094af3a64c7d7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void retrieveMetadata () { | |
| DocumentReference docRef = mFirestore.collection("images").document(mFileUri.getLastPathSegment()); | |
| docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() { | |
| @Override | |
| public void onComplete(@NonNull Task<DocumentSnapshot> task) { | |
| if (task.isSuccessful()) { | |
| DocumentSnapshot document = task.getResult(); | |
| if (document.exists()) { | |
| Log.d(TAG, "DocumentSnapshot data: " + task.getResult().getData()); | |
| mResponse = ("" + task.getResult().getData()).replaceAll("=", ":"); | |
| } else { | |
| Log.d(TAG, "No such document"); | |
| mResponse = "No stored label data"; | |
| } | |
| } else { | |
| Log.d(TAG, "get failed with ", task.getException()); | |
| } | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment