I’m currently developing a Flutter app that utilizes Firebase as a backend for user authentication (Firebase Auth) and data storage (Firebase Firestore & Firebase Storage).
The app’s purpose is to allow users to share their location with anyone else using the application.
I want to continuously retrieve the user’s location, for example, every minute, and store this information in my Firestore database. This retrieval process needs to be executed in a Firebase Cloud Function to ensure that the app functions even when it’s not in the foreground.
So, how can I retrieve the user’s location and store it in Firestore within the user’s document? This means that I need the user’s ID from FirebaseAuth.
If this is still unclear, please reach out and leave a comment. I’ll respond promptly! If you require further details, I’d be happy to provide them. Even a small pointer would be greatly appreciated. Don’t hesitate to reply or comment.
Happy coding, everyone!