CUTR-at-USF / OpenTripPlanner-for-Android

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.
Other
130 stars 91 forks source link

Notifications for several trips #424

Closed vreixo closed 9 years ago

vreixo commented 9 years ago

@barbeau now old notifications are being cancelled on new notifications (for different legs also) and two notifications (one it's just after the other and replaced) are fired for origin and destination. This is very uncomfortable and when using the sound will always be "pock pock" instead of "pock" :-) because there are going to be two notifications although one will be very quickly replaced, so two sounds and only one notification shown.

So, in order to solve this, I'm using bigview advantages and identifying the notifications by tripid. This way notifications are only replaced (updated) if it's for the same trip and it's correctly displayed what has changed origin or destination.

With this changes notification arrival/departure time changes are differentiated and expressed.

Also, it's important that most times delay for same leg departure from origin and arrival at destination will be the same, though this is controlled to don't always repeat the number. Here is an example not repeating the number:

screenshot_2014-09-11-10-33-31

Here is an example of how would like when different delays (it's forced and are the same because it's a pretty uncommon situation):

screenshot_2014-09-11-10-41-30

PD: might be better to also say at in the second one but I was afraid that would be too long.

barbeau commented 9 years ago

@vreixo I like this design of not repeating the number.

barbeau commented 9 years ago

@vreixo FYI - there is a bug with calling Notification.setLatestEventInfo() - see this AOSP issue. So, if you're calling that method, and you're using a deleteIntent, you need to re-register the deleteIntent after calling Notification.setLatestEventInfo() (calling Notification.setLatestEventInfo() erases the previously registered deleteIntent). If you're not using deleteIntent, then don't worry about it.

vreixo commented 9 years ago

@barbeau thanks, but I don't use it.

btw, do you like saying origin/destination or we should say just the name of the stop? Add it also on second image?

barbeau commented 9 years ago

@vreixo Saying "origin/destination" probably helps, for the first image at least, since you have room. I'd probably leave it off the 2nd image since it would push the stop name off the screen. Only other suggestion would be to use "min" instead of "minutes", to give more room.

vreixo commented 9 years ago

@barbeau I agree. So let me fix these before accepting pull request.

2014-09-11 11:40 GMT-04:00 Sean Barbeau notifications@github.com:

@vreixo https://github.com/vreixo Saying "origin/destination" probably helps, for the first image at least, since you have room. I'd probably leave it off the 2nd image since it would push the stop name off the screen. Only other suggestion would be to use "min" instead of "minutes", to give more room.

— Reply to this email directly or view it on GitHub https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/424#issuecomment-55282936 .

barbeau commented 9 years ago

Ok, sounds good.

On Thu, Sep 11, 2014 at 11:42 AM, Vreixo González Caneda < notifications@github.com> wrote:

@barbeau I agree. So let me fix these before accepting pull request.

2014-09-11 11:40 GMT-04:00 Sean Barbeau notifications@github.com:

@vreixo https://github.com/vreixo Saying "origin/destination" probably helps, for the first image at least, since you have room. I'd probably leave it off the 2nd image since it would push the stop name off the screen. Only other suggestion would be to use "min" instead of "minutes", to give more room.

— Reply to this email directly or view it on GitHub < https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/424#issuecomment-55282936>

.

— Reply to this email directly or view it on GitHub https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/424#issuecomment-55283146 .

Sean J. Barbeau, Ph.D. sjbarbeau@gmail.com 813.244.2067 http://www.linkedin.com/in/seanbarbeau