Saturday, 13 May 2017

The Interest Points Tracker app

I was approached by a dear friend of mine with an interesting problem. She is a chef and, as most of chefs do, likes to go around and try new food in new places all the time. However, she usually picks her favorite places from home, perhaps checking reviews on Google or other popular websites. The problem is that, when she happens to be around a particular place she had intention to go visit, she totally forgets about it and perhaps drive past it without noticing.

So, she asked me to make a simple app that allows her to pick places from the map and tracks her once she leaves her house and, most importantly, that notifies her whenever she is close to a placed she saved.

And that's what this application does. In addition, the app will display a place details, such as business contacts, photos and more, if required.

Here are a few screenshots:









Some information about it:

- For the sake of experimenting, I used 2 different ways to obtain the user location. To locate the user position while interacting with the app, I used the Google Location API, the so called fused location provider. This method is apparently more efficient than the classic Android SDK with the Location Manager. Nonetheless, the latter was used in the background service, in order to track the user while the app is not on foreground.

- To pick a place from the map I used the Google Place Picker, which I believe is a great tool considering that it is specifically designed to do exactly that.

- In order to retrieve information about a place, I made use of the Google Web Services API. After performing an HTTP request, the server will send information back in JSON format. All I had to do was manipulating the data and display it to the user. With this method, however, only 5 reviews and 10 photos for each places are sent back, which for this particular application is enough.

- To obtain pictures a similar process was used: from the previous step, part of the JSON response is a list of references for the pictures. Once obtained, these reference can be used to make additional requests to get the actual images (more on this here).

- The activity that displays all the detail about a selected place was another experiment, specifically with the new UI tools such as Coordinator Layout and custom behaviors. It was both challenging and rewarding getting all those views to do what I had in mind.

- To display the pictures to full screen and to add zoom in/out features I opted for a quick and easy solution: this amazing library by Chris Banes fixed all my problems in no time.

The application is downloadable at this link.

No comments:

Post a Comment