hackgvl / trolley-tracker

The Repo specifically for the tracking of the trolley in Greenville
Apache License 2.0
4 stars 2 forks source link

Had a five minute warning where the phone buzzes when the trolley is within a certain distance #63

Closed agautsc closed 1 year ago

agautsc commented 9 years ago

https://codeforgvl.imaginethat.io/trolleytracker/i/5318

jeremywight commented 9 years ago

Great idea for an option to toggle on/off, probably not that hard for the iOS app. On Aug 29, 2015 2:52 PM, "Adam Gautsch" notifications@github.com wrote:

https://codeforgvl.imaginethat.io/trolleytracker/i/5318

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/63.

ajhodges commented 9 years ago

A lovely idea. A backend with push updates would help facilitate this. You could poll in the background but it would drain battery. How would you enable this feature? Would you just enable a setting to always enable the notification every time a trolley is near? Or would it be more of a 1 time thing? Like, "give me a notification the next time a trolley is near". On Aug 29, 2015 5:27 PM, "Jeremy Wight" notifications@github.com wrote:

Great idea for an option to toggle on/off, probably not that hard for the iOS app. On Aug 29, 2015 2:52 PM, "Adam Gautsch" notifications@github.com wrote:

https://codeforgvl.imaginethat.io/trolleytracker/i/5318

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/63.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/63#issuecomment-136054186 .

agautsc commented 9 years ago

I would think it would be a button. If I'm having a drink or dinner near a stop and I want to take the trolley somewhere else I'd open the app and click the "Five Minute Warning" button.

Thinking out loud, some type of determination that the trolley is going in the right direction might be needed. Besides that, I bet things wouldn't be that hard to program in.

Looping @austin9350 for thoughts from the iOS world too.

ajhodges commented 9 years ago

So my first intuition is to explore Geofencing: https://developer.android.com/training/location/geofencing.html

But it seems like an upside-down use case for this. Our user is the stationary one, and the 'Geofenced' object is the trolley.

Maybe it makes more sense to have each trolley stop be a geofence, and let users 'subscribe' to a stop to let them know when a trolley is <~5min away from that stop. Then we also aren't constantly polling the user's location.

But actually we need to geofence by ETA, which I'm not sure is possible...

Also thinking out loud :)

agautsc commented 9 years ago

I think the geofencing on stop is smart and probably a more useful tool. My only push back is, it might be easier for us to explain and for the user to use a single button with the express purpose of being alerted to when the trolley is five minutes (give or take) out.

But I can be easily convinced that the stop update is a better choice.

jeremywight commented 9 years ago

Single button for Ashley is way better ux, could we do the logic in the back end connecting the button to the stop nearest as described? On Aug 31, 2015 6:05 PM, "Adam Gautsch" notifications@github.com wrote:

I think the geofencing on stop is smart and probably a more useful tool. My only push back is, it might be easier for us to explain and for the user to use a single button with the express purpose of being alerted to when the trolley is five minutes (give or take) out.

But I can be easily convinced that the stop update is a better choice.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/63#issuecomment-136513819 .

austin9350 commented 9 years ago

I think this is a great idea. Push notifications are probably a necessity for an iOS client app, the OS is fairly restrictive about what you can do in the background. I went through the same thought process about geofencing, it would be simpler, but is kinda the reverse of what we're looking for. We could probably use Apple's CloudKit service to do most of the server side work. We'd just need the trolley locations to be sent from our server to CloudKit (they have an api and a JS library for it). It supports locations natively, so clients can then just register to be notified via push notification when a trolley gets within a certain distance of a registered location (the user's location whenever they tap the "Notify Me" button). That would be distance based rather than time based, but if we experimented with it maybe we could find a distance that at least kindasortamaybe averaged around 5 minutes.