I want to access a firestore value into a global variable . when I excute it the out will be ""
Asked
Active
Viewed 14 times
0
-
add the related code snippet. – nima Oct 28 '21 at 21:26
-
You cannot simply do that. Firebase API is asynchronous. So please check the duplicate to see how can you solve this using a callback. You might also be interested in reading this article, [How to read data from Cloud Firestore using get()?](https://medium.com/firebase-tips-tricks/how-to-read-data-from-cloud-firestore-using-get-bf03b6ee4953). – Alex Mamo Oct 29 '21 at 07:01
-
thank you for reply. but this deocumenttation is not for java – chanaka_ayesh Oct 29 '21 at 08:12