(Making an Uber like app) I wanna make a global marker for all drivers will be registered on my app with the name shown

You significantly modified the code I suggested. Now the code will not run.

When I provided the code that initially 'worked', I also provided these cautions:

The test example contains a lot of unfinished example code because I was experimenting. You picked and choosed unrelated code and got into trouble.

I can see these issues:

  • problem #1, your modified app uses your FirebaseToken and your Firebase project settings. . It is not using the default FirebaseDB token. I can't use your tokken.
    When I set the Use Default checkbox for the FirebaseDB , I can get the app to respond (it still is broken because you modified a lot of code snippets).

  • problem #2; You added a second LocationSensor for the drivers. You should NOT do allow the drivers from the same app. Your 'lagging' is possibly be you now use two LocationSensors to update. I used only the user's location to decide which driver is nearest at the moment.

You are using a FirebaseDb you need to communicate with. The changes to the DB are not made instantaneously. The FirebaseDB needs to be updated. You also have the Map OSM updating. I know some of the OSM servers used by Map can the can get very slow depending on how many other apps are currently accessing the map tiles. LAGGING will occur. You may need the drivers to update their locations using a separate app.


Do you have a copy of the app aia when it last worked for you? You should have made a backup aia or a checkpoint?

I am sorry, I cannot help you fix this. I am glad that the code was useful (until something happened with your modifications).
.
Go back to the last version that worked for you and try again.

Regards,
Steve