Hello,
I'm currently working on a project where I have successfully implemented a basic timer functionality in my application. The timer starts when a user presses a 'Start' button, stops with a 'Stop' button, and can be reset with a 'Reset' button. Now, I'm looking to extend this functionality by integrating it with Firebase.
My goal is to record the elapsed time for each user into Firebase. Later, I want to aggregate these times for each user and display them in a list, ordered by the total time.
Here are the specific aspects I need help with:
Data Structure: What would be an efficient structure for storing individual timer sessions for each user in Firebase?
Writing Data: How can I best write the elapsed time data to Firebase? What would be the optimal way to capture the start and end times, or should I only store the elapsed time?
Reading and Aggregating Data: What is the most efficient way to read the timer data for each user and aggregate it? Is there any built-in Firebase functionality that can help with this, or do I need to implement custom logic?
Ordering and Displaying Data: How can I retrieve the aggregated data and display it in a list ordered by time?
Any guidance, or references to relevant documentation would be greatly appreciated. Thank you in advance for your help!