Friday, January 2, 2015

Android Location Notification - Practical Scenario

The intention was to create an app that can send an SMS when some one is near vicinity of a location for e.g. Home or Office. Basic requirements were like below

- When user reach in office from home, send out a message saying reached in the Office vicinity
- When user start from office, then send a message saying started from office.
- When reached home, send a message saying reached Home.

Below was the algorithm designed for it.


This was working okay for most part, but was failing in some practical scenarios:

1. The phone sometimes does not connect to the WiFi automatically. This makes the mechanism unreliable because even if user reach office, since the WiFi doesnt get associated, instead stay in the dormant state, the connection change notification doesnt get fired to the application.

2. App was getting notifications when just travelling, as it passes by the WiFi networks. this situation is handled in the app itself. but makes the logic run un-necessarily.

This makes me to think that some other mechanism is really needed to make it really work well. Probably say a complete location monitoring based code and define vicinity etc. 

No comments:

Post a Comment