Sharing a single Google map across multiple devices

Let's say I have an application that uses a google map, and I am the controller, I can add markers, delete markers, etc .... the question is how can I let someone else on my other device see my map in dynamic mode, that is, if I delete / add a marker and it updates, it will see that changes have occurred.

+1
source share
1 answer

You need to synchronize two applications, using, for example, a database on a web server, where all applications send and read updates in their statutes. To do this, you need to make calls to the php server, sending and receiving information, possibly in json.

Alternatively, you can try using sync adapters.

Synchronizing data between your Android device and web servers can make your application much more useful and compelling for your users. For example, transferring data to a web server makes backups useful and transferring data from the server makes it available to the user, even if the device is offline. In some cases, users may find it easier to enter and edit their data in the web interface, and then the data available on their device, or they can collect data over time, and then upload it to the central storage area.

Although you can create your own system for transferring data to your application, you should consider using an Android adapter. This structure helps to manage and automate data transfer, and coordinates synchronization operations in different applications. When you use this structure, you can use several functions that are not available for data transfer schemes that you yourself are developing:

in this link you can find additional information, as well as an example application

+2
source

Source: https://habr.com/ru/post/1487686/


All Articles