Point of Interest Discovery App
In this assignment you will create a map-based app which allows users to learn about points of interest (PoI) near to their current location.
This task is meant to be solved in teams of 2 students. For submission info, see below
Map and Location-awareness
- The main UI of the app should display a map
- The app should listen to location updates
- Location updates should be requested at interval of 5s
- The user's current location should be visible on the map as a blue dot
- Either draw your own circle or use built-in features of Maps library
- Each time the user location changes, the app should make a web request to find out what PoIs are near the user
Wikipedia Geosearch Web API
- Use MediaWiki's Geosearch module / API, which allows to query for Wikipedia pages based on coordinates. The PoI-s will be shown as markers on the map (read more about markers below)
- The base URL for this API is https://en.wikipedia.org/w/api.php
- See tips at bottom of this page and example 3 on this page for more details
- Use MediaWiki's Geosearch module / API, which allows to query for Wikipedia pages based on coordinates. The PoI-s will be shown as markers on the map (read more about markers below)
- For each PoI, the request should obtain:
- Description and Name of the PoI
- Thumbnail image of the PoI
- A link to the full wikipedia article of the PoI
- The PoI request should be limited to searching within radius of 500m of the given coordinates and limit to max 10 results
See below for more tips on how to compose the right HTTP request for this!
PoI Markers on map
- For each Wiki Page, a marker should be shown on the map
- If the user moves and the set of PoIs returned by the web request changes, old markers from the map should be cleared/updated to only show the new PoI near the user
- Clicking on a marker should show the user details about the PoI:
- This info can be shown in some fixed extra UI subsection (e.g. a Fragment, Layout placed alongside the map or hovering above it). An alternative is to place it in a Pop-up InfoWindow when the marker is clicked, but it may be more difficult than the 1st option.
- Minimum necessary info to display:
- Name, Description of PoI (as obtained from Web Request response)
- Image of the PoI (if available)
- Tip: Use Ion libraries Image-specific methods for this
- A button, which when clicked, will take open the Wikipedia page of the PoI in the phone's Browser (use Intents)
- Hitting back button after opening the browser should bring the user back to the app with the markers still visible
- The last clicked marker (currently selected PoI) should be shown in a different color than the other markers.
Other requirements: User Experience
- Permissions handling
- The app should take care of proper permissions management:
- Ask the user for required permissions, and proceed with the main app logic once granted, or tell the user that parts of the app cannot work when permissions are missing
- The app should take care of proper permissions management:
- Checking and requesting Location to be turned on
- The app should notify the user if they have not enabled location and ask them to do it.
- Avoiding crashes and inconsistencies
- The app should not crash when Internet is lost or webrequest results
Submission
Both students should upload the solution, please mention your partners name in the submission comment!
Tips:
Geosearch Request
- For this assignment, use this request URL (adjusting Coordinates, limit params accordingly):
https://en.wikipedia.org/w/api.php?action=query& &generator=geosearch &prop=coordinates|pageimages|description|info& &pithumbsize=400 &ggsradius=500 &ggslimit=3&format=json &ggscoord=56.950|24.100
Here's a breakdown of the request:
URL Param | Description |
---|---|
generator=geosearch | Use the geosearch generator of the API |
prop=pageimages|description | Set which metadata the response should include: coordinates of the object, links to images, the description of the page, and info about the page (including URLs to the wikipedia page) |
pithumbsize=400 | set page image thumbnail size to 400 pixels |
ggsradius=1000 | geosearch within 1000 meters |
ggslimit=3 | return max 3 results |
format=json | produce json output |
ggscoord=56.950|24.100 | the geosearch coordinates |