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

Fix #421 - Notifications only display if minutes should be changed and c... #422

Closed vreixo closed 9 years ago

vreixo commented 9 years ago

...orrected graphical defaults.

vreixo commented 9 years ago

@barbeau with this should be everything ready for release. All the things commented in related issue are solved.

barbeau commented 9 years ago

@vreixo Are you still working on this? Just wanted to make sure I didn't miss anything.

vreixo commented 9 years ago

@barbeau Yes, I am still fixing this. I have thought that it was already, but I was mistaken. Shouldn't be much more.

vreixo commented 9 years ago

@barbeau now it's working great for me :-) I have tested several trips and received several updates for the info and no extra notifications.

Before time was not getting updated in markers and I have also added a check to don't trigger notification if time will be the same. Now minutes are rounded to get more exact results if seconds are higher than 30.

Just it's a bit difficult to test this on a real environment because I need to wait for the trips to modify their time (hopefully this happens quite often with HART, which seems to have a great realtime implementation).

vreixo commented 9 years ago

false alarm :-)

vreixo commented 9 years ago

@barbeau now this is pushing also notifications when on the main map/direction list fragment, I was doing some research but I'm not finding a straightforward solution.

barbeau commented 9 years ago

Can you unregister any pending alarms in onResume, and reregister in onPause?

vreixo commented 9 years ago

@barbeau I'm not quite sure if I understand your proposed solution. We need the alarms always, to update the trips, even in foreground.

barbeau commented 9 years ago

Yeah, I don't think I understand the issue. What's wrong now?

vreixo commented 9 years ago

@barbeau I think that what's wrong it's not a very big issue, but I found it that might be confusing.

When the app it's open it also creates notifications. I have thought that this would be managed by the sdk.

barbeau commented 9 years ago

I think this is OK? The user might be in the app and has planned a new trip, but they should still get notifications for the previous trip.

vreixo commented 9 years ago

@barbeau the updates are only for selected itinerary because it's supposed to be the chosen one and otherwise there will be a lot of itineraries and updates (usually I have 5 or even 6 itineraries). Another related problem will be that to show this to the user would be necessary to change their selected itinerary and that would be probably wrong.

All itineraries are updated but silently if they're not selected.

Also previous itineraries are not taken in account either because I think that might make the things much more complicated to show this info.

The good part is that I have found a solution just using the onStart onStop from MyActivity which will be there all the time except for settings screens where would be even interesting to have the notification because the user is not seeing the times.

Btw. after writing all this I'm starting to think that might be better to always let the notification and be sure that the user don't misses a trip update, because he might not notice the subtle change either way :-)

So, the final conclusion is that might be better to just let it like this and don't add more commits to this pull request. What do you think @barbeau?

2014-09-10 20:30 GMT-04:00 Sean Barbeau notifications@github.com:

I think this is OK? The user might be in the app and has planned a new trip, but they should still get notifications for the previous trip.

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

vreixo commented 9 years ago

@barbeau at the moment I'm reopening and letting the notifications all the time because I'm more into this, if you think that is better the other approach tell me, because I'm hesitating in between both.

barbeau commented 9 years ago

OK - yes, I think it's ok to alert user if they still have app open. If they are alerted for only the most recent trip and they get an alert while in app, then they have been viewing the same trip for a while. Small changes might not be noticed, so notification is ok and still serves a purpose. On Sep 10, 2014 8:39 PM, "Vreixo González Caneda" notifications@github.com wrote:

@barbeau the updates are only for selected itinerary because it's supposed to be the chosen one and otherwise there will be a lot of itineraries and updates (usually I have 5 or even 6 itineraries). Another related problem will be that to show this to the user would be necessary to change their selected itinerary and that would be probably wrong.

All itineraries are updated but silently if they're not selected.

Also previous itineraries are not taken in account either because I think that might make the things much more complicated to show this info.

The good part is that I have found a solution just using the onStart onStop from MyActivity which will be there all the time except for settings screens where would be even interesting to have the notification because the user is not seeing the times.

Btw. after writing all this I'm starting to think that might be better to always let the notification and be sure that the user don't misses a trip update, because he might not notice the subtle change either way :-)

So, the final conclusion is that might be better to just let it like this and don't add more commits to this pull request. What do you think @barbeau?

2014-09-10 20:30 GMT-04:00 Sean Barbeau notifications@github.com:

I think this is OK? The user might be in the app and has planned a new trip, but they should still get notifications for the previous trip.

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

.

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

barbeau commented 9 years ago

Thanks @vreixo!