Real-time monitoring with location

Asked

Viewed 2,489 times

2

I’m creating an app on "Android" where I can locate moving cars on the map, which would be the right way to send my location and monitor cars on the go, which maps api I should use?

1 answer

1

First, you need to analyze whether you need real-time information or whether there might be an update time.

If you need your information in real time, you can use the Firebase for this. With the Firebase you can have real-time information on your client (Android) without difficulty. The problem is that if you reach a certain number of users/requests, you will probably need to acquire some plan (here is a table of values).

But, if your platform allows an update with a "delay", you can create an endpoint within your API, which receives and updates the information. On the part of your client (Android), you can create a Service to update information with the server.

To receive the device location information, you can have a look at the official documentation.

Links:

  • Thanks friend, but regarding the map so I can update the location of the cars on the map to some technique to make it dynamic, I can use Google Maps or it does not support?

  • @Brunorichart within your service, you can store the LatLng of the cars and send this information (through a Broadcast or Eventos) to your map screen. To put the car information on the map, you can use a Marker car shaped, and add the new cars with your list of LatLng https://developers.google.com/maps/documentation/android/marker

  • If the car changes position I need the map to update position, but I cannot allow you to update the whole page, it is possible to change the position of a Marker without affecting the whole map?

  • @Brunorichart yes!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.