jimburton / bigarrow Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Currently, the Activities that use a LocationManager (all the PlaceSearchActivities) get updates when the location has changed by 50m or more, and at most once every 10 seconds. We can optimise this by setting the distance buffer on the LocationManager to a value that is relative to the LatLngBounds of the map. The minimum distance for notification should be relative to bounds, e.g. half. That way, if the map envelope is large (e.g. in an area with sparse places API data), location updates will only be needed when the user moves by, e.g., 500m. When the map envelope is small (e.g. on a city street with lots of nearby places) it would receive updates after moving, e.g., 20m.
I think it's missing from libs/ or is it done purposefully?
Also didn't know where to put, when people do edit their libs to include google-services, they need to include to export too, otherwise BigArrow.jar won't find it when run. Thought this note might be useful for students
Make the arrow look more like the ones in the screenshots. We need three arrays of vector coordinates, one which draws an arrow pointing up/down, one which draws and arrow up/down and off to the left and one which draws and arrow up/down and off to the right.
If possible. See http://developer.android.com/tools/support-library/index.html
"Music" and "Hints" -- these have been copied over from another app and should be removed.
Instead of drawing the arrow so that it points directly towards the location, use the Directions API to point in the direction of the first part of the route to get there on foot. Update this accordingly as the location changes.
The direction in which the arrow points seems to be inaccurate. The code that calculates the angle is in BigArrowGLES20Activity
.
The direction also appears to drift a little over time, without changing the location. To recreate, open the BigArrow activity, wait for the search to complete then wiggle the device around a bit.
The arrow sometimes flips 180 degrees, especially when pointing straight up or down. See BigArrowGLES20Activity
(where the angles are calculated) and opengles.MyGLSurfaceView
(where the rotation is applied and the drawing is done).
Add info to README.md on setting up the project, links to info on installing the Play Services API, getting API keys and why you need two keys etc. Maybe put some info on GPS vs WIFI location and why the app may be using an old or inaccurate location at various times.
Tapping on an InfoWindow in the MyMapActivity should load the PlaceDetails activity for that place.
We should construct a way of caching all responses from the Places API, i.e. place searches, full details for a single place, and photos.
Place details and photos aren't location dependent so these should be cached in a WeakHashMap (i.e. garbage collectable) where the key is the URL that was used to retrieve it and the value is the parsed response (e.g. a PlaceDetails
object) . There should a size limit on the cache, a LRU strategy for expiring contents and a means to empty the cache directly.
Place searches are location dependent. We can probably still use the URL as the key but, if everything except the location matches we need some idea of when we can reuse the results form a search that was "close enough" to the current location. In order to do this, we probably need a version of PlacesAPISearch.search
that takes the current bounds of the map and works out the difference in location relative to that. Place searches that come through the list activity will be trickier, since we have to guess what a significant change in location is.
If locations services are disabled, we fixed map so it's fine, now need to do same with list or perhaps ask the user when the app itself loads and also do the checking onResume()
It would be really nice to stop using Google for the places search and maps. This might come at a cost (features missing from the APIs we use, things not looking as slick, less data available) but I think it's worth looking into. Other than the warm feeling provided by using free/community data and services, we might also benefit from fewer restrictions on how we use, e.g., a directions API (Google naturally want to monetise theirs).
Feel free to add to this list.
. Maps: http://wiki.openstreetmap.org/wiki/Android
. Places: http://developer.wikitude.com/en_GB
Users should be able to pick the type of search they're interested in from a drop down in the Settings screen. See available types here: https://developers.google.com/places/documentation/supported_types . We only want about 10 or so of the most widely used I think -- one is rarely in an urgent rush to find the nearest roofing contractor :-) Not clear what those 10 should be though.
On MyMapActivity, infoWindow should show icon and distance from user's location.
Including contributors and links to the various other sources code came from, like the Pro Android Augmented Reality book.
This is a low priority, but it could be a useful exercise for the students so it would be nice to have it in the reference implementation.
Users should be able to "ignore" and "unignore" a place, meaning that the place in question doesn't show up in any activity (BigArrow, List or Map) until unignored. This is a pretty big feature, as it requires adding a database to the app and making some new screens.
A widget for ignoring should appear on the PlaceDetailsActivity. Tapping this adds a row to the database in a table that probably only needs two columns, _id (autoincrement column) and placeid. Ignored places should be filtered out of the PlaceSearch results. Since we now want to present the 20 nearest non-ignored places, the easy way round it would be to select 20+count(ignored), remove any ignored places from the results then present the nearest 20. This is a nasty kludge though, because we will often be retrieving more records than we need and if someone ignores hundreds of places it would be impractical.
We then need a new Activity that lists the ignored places with an option to unignore them, removing the record from the database.
Draw the arrow in perspective according to the tilt of the device. This will probably require switching to OpenGL.
Open a dialog saying that the app won't work without location data, ask the user if they want to open their settings. If yes, launch an intent to go straight to location settings if possible. See http://stackoverflow.com/questions/7454416/android-open-settings-from-app
Show as much detail as is available on the PlaceDetailAcitivity screen -- opening hours, services, images, reviews, user ratings. Much of this information would suit being displayed in an accordion menu (e.g. the reviews) which is initially collapsed to save space. This can be done with an ExpandableListView: http://www.dreamincode.net/forums/topic/270612-how-to-get-started-with-expandablelistview/
Create a logo that will be used in the app and also as a launcher icon. Need several versions of the file, starting at 48x48 pixels and scaling up. See http://developer.android.com/design/style/iconography.html
If the map covers a fairly large area then the myLocation
marker is only just visible and the "You are here" label is often off the map. Add a buffer to the initial bounds.
I think generalised code is much cleaner and less prone to errors. We might have an enum that includes all details about a place e.g. NAME, ADDRESS with extra info fields (extended enums) so we can easily retrieve details using dynamically generated code, not sure how we'll deal with image types but I should be able to figure it out, for the time being I'm considering only data that can be toString() ified.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.