How i can get tags and values in firebase and make compare?

The student stay at home and he is waiting his bus
That i mean he need to track his bus to know where is his bus now near to his home or far like ubar app
Getting the latest position for his bus but the student at home waiting his bus

How do you intend to get bus coordinates in real time ?

I stored latitude and Longitude of bus

When location sensor changed

The bus driver also has the app ?

Yes
App for bus driver used for store driver bus location in firebase when his location changed

And i need when the student login app
Direct get location of his bus by get bus Latitude and Longitude for this student

As @ABG has indicated, you need a separate data structure for storing bus locations. This should not be in Users, possibly call it Buses.....

Can you explain by example
From store and get data
The idea app for drivers and app for student
The app for driver store his location in firebase when location sensor changed event
And in student app
Student login then get location of his bus to track it

I have already shown you how to retrieve data from Firebase, use these methods to access the bus information, and update the user data accordingly.

It is your app, I am not going to write it for you.

1 Like

How i can separate data structure in firebase

Different Buckets.

1 Like