Google map live location tracking problem with two maps

hello devlopers ,
hope you are doing well ,
i hava a problem in google map live location tracking.

brief explanation about my apps.

i have two app eg *firstAPP && *secondApp

i want to track current location of my *secondApp in my *firstApp map.

just like uber we watch live position of driver.

i open my firstApp map with the LAT LONG of my second app.
but how i can update it and show in my firstApp.

Hope you guys understand please response.

please help it is verry important to me .

use a realtime database like Firestore to sit in between?

You should use the *secondApp to write to some realtime database - if you want to start easy probably you don’t even need to use a map, you can just send the geo coordinates from the current phone location, and use the *firstApp to consume the data from the database and then display it in a map

and what about the update of the consuming cordinates .suppose i consume the codinates and display one time in my first app but when second app change the location i want to show that loaction live in first app

you can have for example a button on the second app to start sending the location every e.g 10 seconds to the database, and have the first app displaying in the map the latest entry of the database

Firebase realtime database/firestore does this for you on the fly. You post data and anyone listening to the data will immediately get the update.

No need to poll.

Definetly go for RealTime database. Firebase has the right solution for it.
If your app got realtime on event then you can change the position of the marker on the google map.
I didn’t try it real time. maybe you can change the position of the marker object or you need to remove/put it.
Please also check the price tags of Google as well…most proably it doesn’t cost a fortune, but they have a little price tag on it…