Hugo
Hugo

Reputation: 767

Howto: broadcast location data to listening iOS/Android App?

Want to build an app that broadcasts its location (master device) to all listening apps (slave devices) and let's them know where the device is.

In a real world example it has to be used in a food truck that drives around a city. The driver of the truck has an iPad App that broadcasts it's location data for example every second to all listening apps. This way if the food truck comes within range of say 300 meter/feet of the slave device it sends a push notification. Also the people should be able to see the location of the food truck on a map.

What is the best way to do this? Is there an easy solution (framework?) to this problem? The slave device can be iOS and Android and it should work on both devices.

Upvotes: 0

Views: 300

Answers (1)

Randyka Yudhistira
Randyka Yudhistira

Reputation: 3652

Your master device > send latitude longitude to webservice > webservice store them to database. Your slave device > run background service to periodically get data to webservice > webservice get latitude and longitude from database > webservice send result to slave device > slave check if the difference between slave location and master location is 300 meter > if yes, then make a notification

Upvotes: 1

Related Questions