onebusaway / onebusaway-android Goto Github PK
View Code? Open in Web Editor NEWThe official Android app for OneBusAway
Home Page: http://www.onebusaway.org/
License: Other
The official Android app for OneBusAway
Home Page: http://www.onebusaway.org/
License: Other
I think a lot of people get errors about getting stops or arrivals when they don't realize they don't have network connectivity, either due to a dead zone or some temporary lapse.
Rather than a generic "problem getting stops" toast or "communication error", try to make it clear that this is because you actually don't have any internet connectivity.
https://github.com/square/retrofit
This looks pretty cool, I wonder if it can work for us.
http://developer.android.com/reference/android/support/v4/app/NavUtils.html
We should use this to implement the Up navigation implemented in NavHelp.java.
Right now we'll warn the user that you can't use it in Airplane Mode right as you start the app.
Since I added this warning, I've added much better error reporting, so there's no sense in pre-warning the user. In particular, this error is totally useless if you want to use the app with Airplane Mode enabled but Wifi turned on (which I didn't realize was possible, at least it probably wasn't when I added the feature).
I just need to move the airplane mode check into the places where I already check for connectivity:
We can reword the Toast as well to say we don't need it, but it's probably preventing you from accessing the Internet.
We should be able to detect stops that are right on top of each other, or close enough within some range, and popup something that will allow you to disambiguate them.
I just built from my fork -- offby1@6e5bcb6 -- and saw this:
Note how the entry for route 16 says "You are out of OneBusAway's service area. Go there now?" That seems out of place.
This didn't seem to happen on Gingerbread, perhaps it's ICS/JB only?
This is the hint text on the "Search" tab of the "My Routes" activity.
I never noticed when the default background was white, but on ICS/JB it's off white it has this strange white-on-off white.
It's odd that you can't get to the stops-for-route list from "route mode" on the map. I think this could be added if we also did something like adding a list mode for stops-for-location (issue #22)
Reported by project member paulcwatts, Nov 22, 2011
Expected:
3. The schedule to be shown
Actual:
4. 404 page
Comment 1 by cookieguru, Jan 22, 2012
Problem is with the Metro GTFS. All the ST URLs are broken. Report to [email protected]
We can add a checkbox for the folks who really don't like this popup.
See this discussion:
https://groups.google.com/forum/#!topic/onebusaway-developers/MsGNjBDdFXs
This would require a few things to happen:
This is possible, but I'm not sure if we really need it. If it's easy to do and doesn't get in the way.
Reported by choiyoung7, May 20, 2010
First of all, I want to command you for your fabulous app. I am a blind. I
recently got Samsung Moment android phone. I use gTalk.
I downloaded your app. most features are working great, however, the first
view to select the bus or bus-stop is a map. If you add listview option
such asn recent stop for TTS, many visually impaired users would be able
to use your wonderful app.
Comment 1 by project member paulcwatts, Jun 20, 2010
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Comment 2 by actorandrew, May 27, 2011
I believe this issue can be remedied by adding a shortcut to the homescreen, under the One Bus Away shortcuts you can add recent stops, recent routes, starred stops, Bus Routes and bus stops. Hopefully this fixes your issue.
It occurred to me the way we persist the old arrival information might end up being more of a problem that a solution. In particular this case:
In onResume, we show the old data and immediately start fetching new data. However, the old data is still on the screen just as we had left it. At some point in the future, the app gets the new data and replaces the old data -- the times appear to jump. Could this be the reason why people sometimes complain the data is jumpy?
Two solutions:
Android docs explicitly say that super.onCreate() should be called in Application.onCreate():
http://developer.android.com/reference/android/app/Application.html#onCreate()
...and this isn't currently being done in com.joulespersecond.seattlebusbot.Application:
https://github.com/OneBusAway/onebusaway-android/blob/develop/src/com/joulespersecond/seattlebusbot/Application.java#L35
There should be some discussion surrounding this, as we don't want to break anything if its working and I don't know if there are other reasons for not doing this.
The wiki/developer page, as well as the mobile app design considerations page:
https://github.com/OneBusAway/onebusaway-application-modules/wiki/Mobile-App-Design-Considerations
There are many advantages for switching to the new Maps API, some detailed here:
https://developers.google.com/maps/documentation/android/
Drawbacks:
Items to research:
In newest SDKs, the lighter icon is used so it's basically a white-on-white icon.
Honestly I think we can improve the whole pin to make it look better and to have different resolutions for different screen sizes.
This is migrated from this bug, where there is a PSD attached:
http://code.google.com/p/seattle-bus-bot/issues/detail?id=56
Repro:
Expected:
3. You should be able to read the text
4. The text is white-on-white, it makes it really difficult to read.
Reported by eric.hanchrow, Dec 16, 2010
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I'm pretty sure I've seen other apps bring up the numeric keyboard when it's clear from context that I'm only going to want to type some digits. For example, if I use the built-in "Contacts" app, add a new contact, and tap in the "Phone" text entry field, I get a nice telephone-style sixteen-key keyboard, with the digits, and just a couple relevant symbols.
I wish OneBusAway did the same thing.
What version of the product are you using? On what operating system?
(It sure would be nice if there were an easy way to figure out what version of the app I'm using; I have to grovel around inside Settings/Applications to get that info)
Version 1.2.8, on Android 2.2 (on a Nexus one, which of course has no physical keyboard)
Please provide any additional information below.
Comment 1 by project member paulcwatts, Dec 19, 2010
Originally OneBusAway did bring up a digits-only keyboard. But you also need to be able to search for non-number routes like "Link" or "Sounder."
Yes, I'd love to have the digits appear first, because it's more likely that you'll want to search for numbers. Unfortunately there didn't seem to be a way to tell Android to do that. It's worth taking another look to see if they haven't added something in newer SDKs.
I'll also add something in Help to get the Version. A cheap way right now is to click on Help / "I found a bug!" and the version is listed in the email template that you are taken to.
Comment 2 by [email protected], Jun 6, 2011
The Android SDK does let you specify the input format so that the numeric keyboard is used. Unfortunately, the numeric keyboard is exclusive and does not let you get back to the 'regular' one. To support both, maybe a toggle next to the input field for the preferred keyboard would suffice. If the most common use case is for strictly numbers and this is the default, then I might never use that little icon except in a 'Ooo, this is new... what does this do?' context. If you need to type something like 'Link' or 'Sounder' and all you get is a numeric keypad, then you'll probably start looking for a way to get a regular keyboard. An icon next to the text field that says 'Abc' would then seem pretty obvious.
It's worth experimenting with, I think. Ideally, though, you'd get a numeric keypad by default and the Android OS would provide an integrated way to get back to a regular keyboard. Maybe there is a way to do this.
Comment 3 by cookieguru, Jan 22, 2012
Launch this app: https://market.android.com/details?id=com.usps
From the landing page, select zip codes.
Tap the "Cities in a ZIP code" field.
Focus on the only text box.
Default keyboard is numeric, and I can switch to my ABC keyboard. This is NOT the "dialer" numeric keyboard but the one with all the symbols.
The length of the route name "Sounder / South ..." pushes the long description far to the right.
Move from http://code.google.com/p/seattle-bus-bot/issues/detail?id=17
Reported by project member paulcwatts, Dec 1, 2009
It would be useful to view the posted schedule of departures from the
StopInfo screen.
Right now this information isn't available from the REST APIs, but we could
still link to the KC Metro site for KCM routes.
Comment 3 by hoffman.mm, Jul 19, 2012
Could you link to the OneBusAway web site instead?
Comment 4 by cookieguru, Today (40 minutes ago)
Since this ticket was created an API method has been added:
Comment 5 by project member paulcwatts, Today (27 minutes ago)
Yeah, the API has been there for a while. It's just that I haven't had time to implement it :)
Part of the big redesign was to allow for more easily adding functionality like this, so it's potentially possible I could get around to it sooner than later.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Android doesn't seem to be restarting the TripService, and so the reminder
alarms are removed. The user has to go and re-save a reminder, add a new
reminder, or reboot their phone.
Figure out a way for Android to run the server post-update, or always run
the service when the user runs the app.
java.lang.NullPointerException
at com.joulespersecond.seattlebusbot.ReportProblemFragmentBase.onLoadFinished(ReportProblemFragmentBase.java:89)
at com.joulespersecond.seattlebusbot.ReportProblemFragmentBase.onLoadFinished(ReportProblemFragmentBase.java:38)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:424)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:392)
at android.support.v4.content.Loader.deliverResult(Loader.java:103)
at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:221)
at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:61)
at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:461)
at android.support.v4.content.ModernAsyncTask.access$500(ModernAsyncTask.java:47)
at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:474)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4945)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Reported by eric.hanchrow, Aug 11, 2012
I use the app on many devices, and have to enter my favorite stops on each. It'd be nice if I could save that list of stops so that it'd be available on every other Android device on which I was logged in, and using the app.
Comment 1 by cookieguru, Today (103 minutes ago)
Dropbox or a similar service?
Comment 2 by eric.hanchrow, Today (101 minutes ago)
Dropbox would be fine. But my Google account would be even better, since most users of one bus away will already have a Google account.
Eventually this could be a link to an activity/fragment, but until there's time to do that it can only be the web link.
Reported by cookieguru, Sep 21, 2010
Both the route popup under "show routes" in map view and the arrivals view show an empty label when viewing Sounder. Similarly, Amtrak fails.
This is probably due to the fact that, despite being a required field, the shortName is not defined for these routes. The API does not return a container for shortName either:
http://api.onebusaway.org/api/where/arrivals-and-departures-for-stop/40_S_KS.xml?key=TEST&version=2
Comment 1 by cookieguru, Sep 21, 2010
Correction, shortName is not required if longName is present.
Comment 2 by [email protected], Sep 21, 2010
Just to be clear, route shortName isn't technically a required field. Instead, one of either route shortName or longName must be specified. Both may be specified. It's up to the app to use the most appropriate. Either way, maybe the Android app could handle this better?
Comment 3 by cookieguru, Apr 20, 2011
This is fixed, though the bounding box for the text label is fixed in width which causes most of the "e" and all of the "r" in "Sounder" to be cut off.
Comment 4 by [email protected], Jun 6, 2011
A grid view works best when the route names are all approximately the same length. If any route has to fall back to its long name, then the grid view should probably be adjusted to suit routes with longer names. This could simply mean toggling between two different column widths, but it could be an indication that a grid view is no longer the ideal candidate for this route list.
I would say that the most significant portion of this issue has been resolved, and that the issue of the label being cut off should be pulled into a separate task.
See this conversation on Twitter:
https://twitter.com/leggett/status/279304677294747648
The idea would be to have the App Icon go to My Stops from a Stop, then to the Map. I know a lot of people, including me, like the ability to go directly to the map from stop, but this may have the added benefit of prioritizing the My Stops screen (which isn't very discoverable as it is).
This could also be done for Routes, where the App Icon on the Route screen goes to My Routes, then to the Map.
Getting back to the map would then require two taps on the same target.
Either that or just change it to be alphabetical -- I'm not sure if anyone actually gets the current sorting mechanism.
What steps will reproduce the problem?
This is most noticeable on a WVGA screen:
What is the expected output? What do you see instead?
There's a lot of wasted space on the right hand side that obscures a good
portion of the map.
We could optimize the layout of the map popup specifically for landscape
mode...
I'd still like to do this. I may be able to incorporate it into a neat "get more" UI.
This task is derived from Issue 68 (http://code.google.com/p/seattle-bus-bot/issues/detail?id=68); specifically, comment #3. The example stop given in that issue (http://api.onebusaway.org/api/where/arrivals-and-departures-for-stop/40_S_KS.xml?key=TEST&version=2) does not seem to exist any longer. To reproduce this problem, one must either mock the API call or find a route that contains a longName but whose shortName is absent. The column in the grid view is set to be a constant 40sp, which does not give enough room for longer route names, like 'Sounder'.
Comment 1 by cookieguru, Jan 22, 2012
http://api.onebusaway.org/api/where/arrivals-and-departures-for-stop/40_S_KS_NB.xml?key=TEST&version=2
This will be helpful in diagnosing when people email me about GPS problems. I may be able to add a lat/lon/accuracy as well.
I use the "reminder/notification" icon which looks like a generic "notification" icon. We should use something that more specifically calls out as OneBusAway, like the old bus icon.
This would be useful for three reasons:
OK, that's four reasons.
Reported by eric.hanchrow, May 1, 2010
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What I'd prefer is for the dumb soft keyboard to NOT pop up, thus hiding half the screen.
But in fact, it does pop up, which is annoying: I have zero interest in giving this reminder
a name; I just want to be alerted when the bus is going to arrive.
I have to hit the "back" button to get the keyboard out of the way. I realize this is just
one keystroke, but it irks me every time. (Also, I use a non-standard soft keyboard, which
is larger than the built-in one, so it's even more annoying.)
What version of the product are you using? On what operating system?
Android app, version 13.
Comment 1 by project member paulcwatts, May 6, 2010
Hmm, the keyboard doesn't pop up on my phones (G1 and Droid). But yeah, I've been annoyed at starting on the
'name' field when all I want is a one-shot reminder.
Status: Accepted
Owner: paulcwatts
Comment 2 by project member paulcwatts, May 7, 2010
This does happen on a myTouch 3G, so it just have something to do with physical/virtual keyboards.
Comment 5 by eric.hanchrow, Oct 28, 2010
Let me amend this a little (perhaps this should become a separate issue): setting reminders takes way too many steps.
I realize some of these are outside of your control, but in the interest of being a whiner, let me enumerate the steps I go through every morning before leaving home:
That's nine separate actions, each of which is crucial.
It'd be ideal if there were some way to boil this down to one action (after unlocking the phone, which of course you have no control over) -- perhaps by having an icon that means "set an alert, for my favorite time interval, on my favorite stop, and oh by the way make sure the sound isn't muted"
Comment 6 by [email protected], Jun 13, 2011
I think that this problem could be solved by moving the 'Name' field down further in the form. The Android OS probably anticipates that that field is the first thing you want to enter because of its position in the form. If it is moved further down, it will naturally no longer be selected by default.
There apparently is a way to do this:
Right now we only have arrival reminders for when a bus is coming to the
stop where you want to board.
Multiple users have requested the ability to have a reminder for when you
want to get off the bus.
This will be dependent on showing the trip schedule; we'll have to wait
until that API is stabilized and create a screen for it.
Labels: Milestone-1.5
Comment 3 by [email protected], Jun 13, 2011
A workaround for this issue could be to set a reminder for when the bus that you are on is scheduled to arrive at the stop where you want to get off.
We're on 1.8.5, they're on 2.0.6.
I've definitely had reports where some of the accuracy problems people have with OneBusAway is because the clock on their phone is off. This only becomes apparently when it's way off, but perhaps some of the other, smaller inaccuracies are because of smaller offsets.
There are two options to consider:
This time I can potentially add it directly to the app, since it changes infrequently enough.
It looks like we may need to expand our search radius -- perhaps the default radius should be expanded?
Adding debug statements to track regions logic will help developers that aren't as familiar with the source code follow the current state of the application at runtime and make improvements. Debug statements should be added so they are only visible in the debug configuration (i.e., not in release):
if (BuildConfig.DEBUG) { Log.d(TAG, "debug message goes here"); }
When using shortcuts to stops, the app might not display the shortcut that was actually activated.
Repro:
Workaround:
After step 7 above, press the back button on the phone. This correctly display the first stop schedule.
Notes: once the bug is triggered, clicking the back button of the app (one bus away logo at the top left) bring you to the map. From that point, going back to the home screen and clicking the first shortcut brings you to the map instead of the schedule of the stop.
Reported by eric.hanchrow, May 13, 2010
What steps will reproduce the problem?
Note that the default is once again 10 minutes. However, I'd prefer it to
be 5 minutes, since that's what I chose last time.
What version of the product are you using? On what operating system?
This is the Android app version 1.2.3, on Android 2.1
There's no longer an OBA API for it, but people continue to ask for it. Frankly I doubt I will ever have time to do this, but I want to keep something open because it's such a popular feature request.
To be clear, this would involve either bringing back Brian's API, integrating OpenTripPlanner, or running my own server. If it were a different server it would have to be kept updated with GTFS updates just like the main OBA server is.
Moved from: http://code.google.com/p/seattle-bus-bot/issues/detail?id=83
It would be great if you could convert the APK file to a BAR, so the Android version of the app can be either be side-loaded on a Z10/Q10 or hosted on blackberry world.
Reported by project member paulcwatts, Sep 24, 2010
From a user who is reporting the times on the Android client are different from those on the iPhone. I'll probably need to make sure I'm synchronizing with OBA's system time rather than the phone's time.
Hi Paul, I may have found the cause. My Droid's clock is about 4 minutes faster than the IPhone's. 4 minutes appears to be the difference between the bus times as well.
FYI. ONEBUSAWAY's times are consistent with Iphone so you might want to inform Droid to sync with you to avoid it to show a bus has departed when in fact it hasn't.
Thanks, Robbie
On Sep 24, 2010 6:00 PM, "robbie avila" [email protected] wrote:
Hi Paul,
I mostly wait at:6:30 AM: NE 8th St & 164th Ave NE Westbound, Bellevue, 6:30AM
3:30 PM: Stevens Way & Construction Pull, Southbound, UW Campus,
I ride route 272, although I noticed the discrepancy for other routes.
I also observed the same at other stops when I checked.
Comment 1 by cookieguru, Dec 6, 2010
I can confirm that this is an issue for me as well. I ran a simple test loading a webpage that runs the current-time API call as well as a JavaScript getter to display the phone's time. My phone is consistently 76 seconds fast. I'm on Verizon's network.
This is odd as most carriers have a GPS reciever at the cell site which is used for timing. I guess timing isn't as important when you're using CDMA versus TDMA.
I'll try and run some more tests, as this morning the route 181 which stayed as "on time" arrived when the countdown displayed -4 minutes which is in line with Robbie's observations.
Comment 2 by cookieguru, Dec 7, 2010
This morning my phone.got down to 78 seconds behind. However, if one goes to Settings --> Date & time make sure "Automatic" is checked. Now I'm running 17 seconds fast.
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.