I want to retrieve GPS location of one android device and fetch it to another android device in realtime. I have gone through many resources and came to know that it can be implemented using GCM, FCM, sockets or by polling. However GCM or FCM cannot provide the updates in realtime and polling will lead to more battery drainage. For Sockets I have gone through socket.io implementation but I don't know whether it is the perfect implementation. So please provide suggestions on how to better implement that.
Now another scenario is if multiple users are connected to the server through the same socket then how can we figure which user is monitoring whom ?
Please help...