Question

I am looking on developing a tourist application for a city, where when the user is near to a "place of interest" he could get a push (local) on his device.

For example, I would add 100 POIs on my app, and a 100 messages for every POI to show when the user is in range, e.g. "You are close to the Cathedral of.."

Is this scenario possible? Is it possible to check the users position e.g. every 10 minutes even when the application is killed, and when in range fire a local push? How much battery would it drain? If the user closes the GPS would it try to use 3G/wifi signal to get the position?

If yes could you guide me the right way on what I should read on the subject maybe some tutorials and articles?

No correct solution

OTHER TIPS

that's indeed possible. You could use the aforementioned technique outlined in this post. You can extend this with using CLLocationManager:: startMonitoringSignificantLocationChanges to restart the process of listening to locations after the app has been killed. Depending on your accuracy needs there are many other optimizations that can be done regarding battery life, like checking more frequently when a user speeds up etc.

I have developed a library that handles these details for you (for both Android and iOS). The download includes an example application that demonstrates how to use it. Feel free to check it out.

Yes,that is possible.you need to have some "places" (co-ordinates or addresses) stored on theapp locally. Proximity to a stored "place" can be checked by Reverse geocoder.

Check this Wonderful SO Question , very similar to yours

This might be too late for your question, but for anyone else that needs it. GeoFencing is a good option.

Here is a video explaining what geofencing is http://academy.pulsatehq.com/7-things-about-geofencing

And if you are using Ionic platform, here is the link to the plugin https://github.com/cowbell/cordova-plugin-geofence

GeoFencing will solve exactly your problem. Just create a bunch of geofence located at these tourist sites and when user enters within certain radius of these locations, user will get a notification.

Good luck

When the app is killed, what exactly would be receiving the location updates?

When in the background though, you can set up location updates based on both proximity and time.

Check How do I get a background location update every n minutes in my iOS application?

As for GPS vs. 3g/wifi, the user has the ability to either allow location services for an app, or not. iOS will then handle whether GPS or cell signal will be used to determine position. Read about the significant-change location service here. Using the significant-change service will use more cell location than GPS lock to determine position, and vice-versa for the standard location service. Also look at location accuracy to learn more about conserving battery.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top