Hacker News new | ask | show | jobs
by tombell 4772 days ago
If you built an app knowing it NEEDS push notifications on a platform where it's optional for the user to enable/disable, you failed as a developer. The application should be able to function either way. Users deny getting their location? Ask them to input a location instead.
1 comments

It's also very easy to look up the user's rough location by asking a server and doing a geoip lookup for the client ip. Much less precise (city-level accuracy), but more privacy-friendly and usually good enough to base location-aware functionality on. Works well as a fallback - which as a dev you need anyway as GPS is often not available, even with the player's permission.
An interesting drawback to the location-by-IP-address approach is that for cellular devices, IP addresses can be supremely inaccurate. For example, I have a Verizon device whose IP address places me way off in the West coast of the US even though I purchased it and reside on the East coast, 3000 miles away. The approach is pretty solid for LAN/WiFi, though.