Developer info
This page is meant primarily for developers and other people who are interested in the details of the app. The main page is here.
I started a blog about developing this app: here's the link.
Changelog (new updates)
-
Oct 29, 2012 - This is still being updated! I'm just being lazy about maintaining this part of my website, so the version numbers are not up to date
-
Sep 25, 2010 - version 2.30-2.32
- bug fixes
-
Sep 11, 2010 - version 2.29
- changing text around to be more intuitive
- attempted to fix GPS bug. GPS seems to persist after exiting the app on occasion if the app doesn't close properly
- fixing bug in favorites where it didn't list all routes a stop had
-
Sep 8, 2010 - version 2.28
- route pooling implemented, so memory issues should not be a problem anymore
- added all bus routes
-
Aug 27, 2010 - version 2.27
- new app icon! Thanks @hamtibz
- memory usage decreased. That's a neverending battle, so memory usage bugs may pop up again. In the long run I want to implement pooling for important objects so that the app can load only the routes and stops the user cares about. This will take a bit of work, though
- added back route overlays. They should be more detailed now; this will be really slow on older Android devices
-
Aug 25, 2010 - version 2.26
- including new route information which has some new bus routes
- the route overlay feature is removed temporarily due to space concerns; this will be added back next update.
-
Aug 11, 2010 - version 2.25
- route information is now included with the app instead of downloaded after you install it. This adds 900k or so to the app, increasing its size from 80k to about a megabyte, but I figured that was ok. This change should be temporary, although I don't know how temporary
- The mode switching button was changed to a drop-down menu
-
Aug 7, 2010 - version 2.24
- location should now act like it does on Google Maps, updating constantly until you close the app
-
Aug 6, 2010 - version 2.23
- increased number of stops to update at once
-
Aug 5, 2010 - version 2.22
- fixed bug with favorites not showing up immediately
- added a timeout to the route info downloads, and more messages to inform when route info downloads happen
-
Aug 4, 2010 - version 2.21
- limited number of stop predictions due to bandwidth issues, and route info is now downloaded on an as needed basis. See this thread in the MassDotDevelopers Google group.
-
Aug 2, 2010 - version 2.19 & 2.20
- fixed concurrency bugs
- Aug 1, 2010 - version 2.16
- fixed the bug I thought I fixed in 2.11
- added favorites! How this works: click a bus stop. Click menu, and click Favorite to mark or unmark as a favorite. Click the upper right button to switch to the favorites view (a bus stop with a star) to see only bus stops you have favorited
version 2.17:
- fixed a different memory leak and a bug in loading some stored favorites from disk
version 2.18:
- changed predictions to print all from the same route if looking at only bus stops on a single route. Looking at it in favorites will see the last three predictions, regardless of route
- Jul 31, 2010 - version 2.14
- fixed memory leak. Each time the user exited the app, most of the data would stay in memory. This was because the main activity referred to these data structures after it exited, which prevented them from being garbage collected.
- fixed bug I introduced in 2.13 where the icons would stop following the map around if you went to the preferences menu or etc.
- Jul 30, 2010 - version 2.13
- fixed bug where some phones with more than 2GB were improperly said to not have enough disk space
-
Jul 26, 2010 - version 2.11
- added support for the rest of the bus routes that the MBTA released today
- rewrote database code to be more efficient. When the new bus routes were added to the feed, the feed provided roughly 8 times as much data as it had before, so some phones were having problems handling this. I tested it on my G1 and it seems to do OK, but don't hesitate to email if you're having a problem
- it will now also check to make sure you have enough room on your phone before attempting to download any data
version 2.12:
- hitting the button on the upper left during the initial download caused a crash
-
Jul 25, 2010 - version 2.10
- the infer bus routes XML feed went offline for some reason, and apparently I never accounted for that, so it mistakenly says that you can't get to the bus feed. This is fixed in 2.10
- routes can now be drawn out on the map, if you go into Preferences and enable that option. NOTE: this is currently slow on some phones
- other minor optimizations
-
Jul 24, 2010 - version 2.09
- fixed rotate screen bug which cut off the download of the initial route data
- changed accessable to accessible
-
Jul 18, 2010 - version 2.08
- fixed ui issue where rotating the screen produces icons that don't show text when selected
- added toggle button which should allow users to see only buses on certain supported routes if they want
-
Jul 8, 2010 - version 2.04-2.07
- force closes which happen when you change screen orientation should be fixed, I think. It will still act a little weird (text won't pop up at first) but it should work after an update happens
- force closes and glitches which happen when you change between "Bus Locations" and the various routes should be fixed
- other force close bugs fixed relating to typos in the program
-
Jul 7, 2010 - version 2.03
- concurrency bug fixed. Sometimes if you switched between routes it shows two different sets of icons at once, and neither one works properly
- all route information is downloaded at once, which means direction info should work properly for buses which are supported
- I limited the predictions to only show the most recent three, to improve readability. Also, the "arriving in x minutes" is now always on a new line, also to improve readability.
-
Jun 23, 2010 - version 2.02
- drop-down menu now updates instantly when you select a new option
-
Jun 9, 2010 - version 2.01
- fixed focus bug
- route you picked will be default route when you start app next time
- features to come:
-- routes overlayed on map as a line
-- ability to bookmark stops, so you can find them easily
-- (maybe) ability to see stops around your current position, rather than just of a particular route
-
Jun 7, 2010 - version 2.00 (beta)
- bus predictions supported! Click the drop-down box to choose a route. It will take a little while to update, I'm trying to fix this to happen instantly
-- Also note that the first time you view predictions for a route, it will have to download the route information first, which may take a little longer than usual updates. This route information is saved to the device and it should not need to be downloaded again (at least until MassDOT updates that information)
-- NOTE: bus predictions are not always accurate. This app simply uses the info from the feed, so I can't improve upon their predictions (nor would I know how to).
- features to come:
-- ability to bookmark stops, so you can find them easily
-- (maybe) ability to see stops around your current position, rather than stops of one particular route
-
Jun 4, 2010 - version 1.25
- added back infer bus preference checkbox. I jumped the gun and removed it before MassDOT added all the routes to their feed. They added a bunch more, but it looks like it'll be the end of summer before all routes are added. I'm still pretty happy about this though
- fixed display glitch with location icon where it would stretch the bounding circle
-
Jun 3, 2010 - version 1.23:
- centering on location now shows an icon approximately where your location is. Note that this is a rough estimate and your location won't be continually updated like it is in the Google Maps app (I simply haven't had time to implement that part of it)
- MassDOT's feed now seems to show all bus routes! So I removed the infer bus estimation stuff. Thanks Nickolai Zeldovich!
- Grey highlight circle replaced with a blue outline circle
- version 1.24 fixes a small graphical glitch
-
May 26, 2010 - version 1.22:
- I set the wrong map API key in the last version, so the map didn't update properly. That's fixed now, thanks for your patience
-
May 25, 2010 - version 1.21:
- force close bug fixed. This only happened sometimes when no buses were displayed and you clicked the screen.
-
Apr 24, 2010 - version 1.20:
- Infer vehicle routes checkbox should take effect faster
- I moved the Refresh button into the menu instead, and got rid of the title bar to free up space. Please email me if you want me to change it back.
- Bus icons should look better now
- Grey shadow where buses are currently being displayed should be a little lighter
-
Mar 13, 2010 - version 1.19:
- bug fixes. Fixed bug where clicking "Center on Boston" before any updates happened would cause it to crash. The "Infer bus routes" checkbox now takes effect after the next update, instead of when the app restarts.
-
Mar 6, 2010 - version 1.18:
- see 'Inferred bus routes' above
-
Mar 1, 2010 - version 1.17:
- more performance improvements
-
Feb 28, 2010 - version 1.15:
- app should be less sluggish than previous release
- a grey circle shows you what area the app buses are currently being displayed. To look in other areas, move the map
- I got rid of the 10 minute timeout, it seemed like a foolish decision in hindsight. The app shouldn't consume any power when paused (the screen goes blank for instance); if it does send me an email.
version 1.16:
- bug fixed where using "Center on current location" or "Center on Boston" didn't update the bus locations also
-
Feb 17, 2010 - version 1.14:
- refreshes and icon updates didn't line up well, which caused buses to jump around. This bug should be fixed, mostly
-
Feb 16, 2010 - version 1.13:
- bus icons now show up whenever you move the map, instead of waiting for the next refresh.
- "Seconds since update" is now computed from the time you click the icon, instead of from the time of refresh
-
Jan 30, 2010 - version 1.10:
- tooltips changed to act more like other Google Maps tooltips
- slightly more overlay icons
- bug fixed where clicking the Refresh button after getting the 10 minute message asked you to wait another 10 seconds
- bug fixed; location finding will timeout after 40 seconds, or if the app closes
- version 1.11 fixes a bug where the "Can't find location" box popped up even if it was successful
- version 1.12 fixes arrow showing up even when the direction hasn't been calculated
-
Jan 24, 2010 - version 1.09 introduces a few new features:
- Your location is saved when you exit the app so that you don't have to pan back to it each time you use it
- I added two buttons to the menu. "Center on your location" gets a quick location fix using whatever is available (GPS or otherwise). It won't wait for a very accurate location, just something that's good enough. "Center on Boston" centers the map on Boston.
- Arrows are drawn on the buses showing what direction they were heading the last time they were updated.
- Jan 19, 2010 - version 1.06 fixes a bug in the updating code I introduced in 1.05, where sometimes it would stop updating.
- version 1.07 fixes a bug with the Refresh button not restarting the timeout like it should have
- version 1.08 fixes a similar bug regarding the timeout
- Jan 18, 2010 - version 1.05 released. Fixed bug where screen rotate makes zoom buttons disappear. Also added timeout option (enabled by default) which turns off the constant updating after 10 minutes to save battery life. This might be useful if you accidentally leave the app open on your phone (like I did earlier today)
- Jan 16, 2010 - version 1.04 released. The buses change color when selected, which might make it easier to track a moving bus in a crowd of other buses. I also fixed the issue where changing the phone from portrait to landscape mode caused the app to restart everything
- Jan 4, 2010 - version 1.02/1.03 released, which changes the targeted Android version to 1.5 (it was previously 1.6) to allow more users to run it. There were no 1.6-specific features so this was an easy change. Also, a pretty embarassing bug was fixed, where the estimated bus directions pointed in the opposite direction they should have.
Source
The Github page for the source code is http://github.com/bostonbusmap/bostonbusmap.
See the git repository for the latest source code. I used to maintain APKs and tarballs but I've gotten a little lazy about that. The master branch should usually be buildable if you want a debug build. Please contact me if you need a release build and you don't want to use the Android market for it
Longer Disclaimer
There is no warranty or any guarantee regarding the app. You should not rely on this app for any information or anything else.
I'm releasing it in hopes that someone will find it useful. My main motivation for making this app is to avoid waiting outside in the cold or rain for a bus when I could be waiting indoors. I don't know how other people will find it useful, and it may end up not being that useful for me either. There's no guarantee that this will be useful at all, or even work properly, or anything; you're on your own, although you can always email me if you wish (see Contact below).
There's also no guarantee that I'll maintain the app (although I probably will for the near future). This means bugs may never be fixed, and newer Android-based devices may never be supported. This is a spare time project for me.
Copyright/License info
This app is released under the GPL version 3.
MassDOT provides the information in the feed. See the below section 'About the MBTA's feed' for more information. The app may at times bundle this information into the app; this information is not GPL'd or released under any license, and is owned by the MBTA.
The bus icon comes from here: http://www.aiga.org/content.cfm/symbol-signs
This app uses Google Maps. See their terms of service here: http://maps.google.com/help/terms_maps.html
The stop icon was made by John Earnest. It uses the MBTA 'T' logo which might be trademarked or copyrighted.
The star icon comes from here: http://commons.wikimedia.org/wiki/File:Empty_Star.svg. You can find the full star on a link on that page.
The program incorporates code from android-mapviewballoons. This is copyrighted readyState Software, but it's under the Apache license.
App icon and logo (since 2.27) by Brittany Hamtil.
About the MBTA's feed
See: http://www.eot.state.ma.us/developers/realtime/
The Massachusetts Department of Transportation (MassDOT) owns and provides the information this app uses. The information this app uses comes from this xml feed and other related ones.
They have their own disclaimers that you can read at the link above. In particular, they may have outages, incorrect or missing information, or it may just not update that frequently. These things do happen and it may impact your usage of the app. I think it's just great that the information is publicly available and that they're making an effort to work with developers to use their information.
They require users of the feed to obtain information only as often as once every 10 seconds. The app should obey this rule; please don't try to circumvent it.
The feed is a trial feed. The URL or the XML schema may change, breaking the app.
Not all routes are supported yet, but MassDOT plans on supporting all bus routes by the end of summer, 2010.
How does this work?
Bus Locations
- it downloads the XML file from the feed mentioned above in 'About the MBTA's feed'
- it gets the 20 closest buses to the center of where the map is located at the time. The app slows down significantly if too many are displayed at once, so it's limited to 20 currently
- it draws bus icons at those coordinates. If these icons are tapped, it should display basic information about the bus
- you can update manually by clicking "Refresh", or update automatically every 10 seconds or so by checking the "Update continuously" checkbox in the settings menu
- you can click the icons to see information about a bus
Bus Predictions
- when you first downloaded the app it downloaded some route information data. This has all the bus stops, what routes use them, and what direction buses on those routes are heading. It was cached to your Android device in the database in a serialized format.
- it downloads the prediction data for all the bus stops in the route every 10-15 seconds or so. If you're looking at the favorited stops, it downloads information for only those stops instead
- it uses the information from the cached route data and the new prediction data to print out useful information about when the next bus is predicted to arrive