Advertise on Bikeforums.net



User Tag List

Results 1 to 20 of 20

Thread: Sag Wagon App

  1. #1
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sag Wagon App

    I've started working on rebuilding an app that I began awhile back, lost when I switched jobs, and which some people convinced me to start on again. I thought I'd begin posting updates/changes to it here so that as I get parts of it working I can comment on it here.

    The app itself aims to be a social sag wagon application. It will allow a person with a bike that breaks down to request help from all cyclists within a general area. Additionally, it will allow for a person that needs medical help to request it and in some cases may request help for the person if the cyclist becomes incapacitated.

    It does not use a data plan to function so it is capable of being used where only non-data roaming access exists.

    Here's a photo of the application main screen for the time being:
    sagwagon_app1.jpg

    Here's the beginning of user profile modifications for the backend website to track the sag wagon phone numbers:
    sagwagon_profile1.png

    8/9 - Fixed the bugs that caused the slow execution. Put together a class to monitor the accelerometer and figured out a workaround so it can work on most devices with the screen off. (Saves a lot on battery usage that way.) Working on the RequestHelp class now.
    8/8 - Found some bugs in it tonight that were causing the code to block for too long while waiting for registration response and BlockGuard was being enabled to kill the app. Had to fix that asap...
    8/5 - I got the registration and preferences stuff completed now except for making the password for encryption change to one using key exchange. (This is so I can have some encrypted data over SMS and in some cases send objects over SMS). Tomorrow I'll be starting on the code for sending the Sag Wagon SMS messages to every person in the local area.

    8/2 - The app now receives the SMS messages from the inbox and then fires off a registration validation request. The backend is now seeing that request, doing a database lookup for what is needed, and is then responding with an AES-256 encrypted block of text. That text gets decrypted and the json object inside is then placed into memory and stored in the user preferences.

    Essentially, this will make it extremely difficult for someone to pretend to be the application and register devices to the wrong accounts.

    8/1 - Finishing the backend registration system so I can test mobile device registration and persistent user data storage. It's now sending SMS messages when a person adds a Sag Wagon phone number to their profile. Then, under the "Settings" menu is a "Validate" button that scans the content://sms/inbox for validation sms messages and automatically completes the validation.
    7/31 - Got about 75% of the way done with profile storage and backend registration.
    7/30 - Tested various encoding methods for user registration.
    7/29 - Wordpress installed for the backend. Got the settings menu / phone registration started.
    Last edited by iconicflux; 08-09-12 at 10:01 PM.

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Location
    Portland, OR
    My Bikes
    Surly LHT set up for commuting
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool idea. Will you include GPS tagging? This would help with people who are incapacitated or with people who are bad @ directions (i.e. cyclist is -here- on the map).

  3. #3
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah it will include gps tagging and gps to address conversion if data is available. (I know how to do it without data available but it's unfortunately too large in size to make it something to put on every device.)

  4. #4
    Senior Member Mithrandir's Avatar
    Join Date
    Jun 2011
    Location
    Buffalo, NY
    My Bikes
    2012 Surly LHT, 1995 GT Outpost Trail
    Posts
    2,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great idea.

    I have one minor piece of advice however; I would stay away from functions requesting medical help.

    My company developed a similar feature for a college campus map app we wrote last year, but our lawyers made us remove it. The reason being that if someone came to your aid and either ended up hurting you or ended up being hurt themselves (in the case of an attacker), the company could easily end up being liable for damages.

    We opted to put a dialog instructing users to call the local emergency service number (911/999/etc) in case of injuries or attackers.

  5. #5
    Administrator CbadRider's Avatar
    Join Date
    Sep 2008
    Location
    On the bridge with Picard
    My Bikes
    Specialized Allez, Specialized Sirrus
    Posts
    5,730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like a great idea, but as a female I would be wary of broadcasting that I was stuck somewhere and in need of help. Too many weirdos out there.
    Quote Originally Posted by toddles View Post
    So Tom only hires people that are nutty? Is part of the requirement to be a moderator on this site is that you have to be nuts??
    Forum Guidelines *click here*

  6. #6
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mithrandir - I was actually planning on making an emergency request be a way to connect to 911 very fast and broadcast to them your location. I think it would be inappropriate to make a medical request to the generalized local population. For the most part what I envision the emergency functionality being wont be available till 2013 at the earliest for verizon networks and later than that for others.


    Quote Originally Posted by Mithrandir View Post
    Great idea.

    I have one minor piece of advice however; I would stay away from functions requesting medical help.

    My company developed a similar feature for a college campus map app we wrote last year, but our lawyers made us remove it. The reason being that if someone came to your aid and either ended up hurting you or ended up being hurt themselves (in the case of an attacker), the company could easily end up being liable for damages.

    We opted to put a dialog instructing users to call the local emergency service number (911/999/etc) in case of injuries or attackers.

  7. #7
    BF Risk Manager
    Join Date
    Mar 2006
    Location
    Snohomish County, Washington USA
    My Bikes
    Road, mountain and folding
    Posts
    896
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CbadRider View Post
    It sounds like a great idea, but as a female I would be wary of broadcasting that I was stuck somewhere and in need of help. Too many weirdos out there.
    I prefer the term 'quirky'.
    Regards, MillCreek
    Snohomish County, Washington USA

  8. #8
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got some more done on it today. The backend is now sending validation SMS messages and the Settings menu has a validate button that reads through the SMS messages received looking for SAGWAGON:VALIDATION messages to parse and act on (it uses some cryptographic functions to build a message to respond). Essentially, the validation is done almost automatically.

  9. #9
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The app now receives the SMS messages from the inbox and then fires off a registration validation request. The backend is now seeing that request, doing a database lookup for what is needed, and is then responding with an AES-256 encrypted block of text. That text gets decrypted and the json object inside is then placed into memory and stored in the user preferences.

    Essentially, this will make it extremely difficult for someone to pretend to be the application and register devices to the wrong accounts.

  10. #10
    Senior Member pgjackson's Avatar
    Join Date
    Oct 2010
    Location
    Gulf Breeze, FL
    My Bikes
    Rossetti Vertigo
    Posts
    3,846
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CbadRider View Post
    It sounds like a great idea, but as a female I would be wary of broadcasting that I was stuck somewhere and in need of help. Too many weirdos out there.
    Exactly. Good idea, but would you really accept a ride from some total stranger? A better app would be a taxi app. Just hit the "help" button and it broadcasts to all taxi services.
    "These are questions for wise men with skinny arms." - Khal Drogo
    2011 Rossetti Vertigo w/ SRAM Rival 16.1lbs

  11. #11
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would certainly accept a ride from another cyclist if I had a bike that was unrideable. Everyone I know that uses Warm Showers has only good things to say about it so apparently cyclists aren't that bad of a bunch of people.

    The problem with a taxi app is that no taxi service would come pick you up if they knew there were other taxi services on the way too.

    8/5 - I got the registration and preferences stuff completed now except for making the password for encryption change to one using key exchange. (This is so I can have some encrypted data over SMS and in some cases send objects over SMS). Tomorrow I'll be starting on the code for sending the Sag Wagon SMS messages to every person in the local area.

  12. #12
    Senior Member himespau's Avatar
    Join Date
    Jun 2008
    Location
    Louisville, KY
    Posts
    7,487
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I like the idea, but I don't know how many other people out on rides would have their phones with them and on such that they'd hear that they had a text and know that there's someone a mile a way who could use the spare tube or patch they have under their seat. Or is this supposed to be for people at home or whatever who get the text and come out to help you?
    Punctuation is important. It's the difference between "I helped my uncle, Jack, off a horse" and "I helped my uncle Jack off a horse"


  13. #13
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its supposed to be to request help from anyone whether they're at home or nearby on a ride. I know that it could be used for something as simple as someone needing a tire patch but I think it's more likely that it will get used when someone has seriously broken their bike or are unable to ride like from crashes.

    Honestly though, the biggest reason I'm doing it is simply because I've had the experience where you're knocked unconscious during a crash and when you come too you're so dazed it's hard to scrape yourself off the pavement. I hope it helps save a life by being able to get help when a person is otherwise incapable of doing so. The rest of the features for requesting non-emergency help are simply a nice-to-have...


    As for a recent status.. found some bugs in it tonight that were causing the code to block for too long while waiting for registration response and BlockGuard was being enabled to kill the app. Had to fix that asap...

    Quote Originally Posted by himespau View Post
    I like the idea, but I don't know how many other people out on rides would have their phones with them and on such that they'd hear that they had a text and know that there's someone a mile a way who could use the spare tube or patch they have under their seat. Or is this supposed to be for people at home or whatever who get the text and come out to help you?

  14. #14
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed the bugs that caused the slow execution. Put together a class to monitor the accelerometer and figured out a workaround so it can work on most devices with the screen off. (Saves a lot on battery usage that way.) Working on the RequestHelp class now. Once that is done I'll work on the Emergency class. Then I'll use a service launched from the main onCreate class that will monitor the accelerometer.

    Once I have that I'll take my Droid2, put it in a protective covering, go down to the dump and use some bikes people throw away to record what happens in a crash. Hope I can figure out how to get that recorded without having to risk road rash for it.

  15. #15
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay.. couple of questions for people here.. (if anyone is actually reading these and wants to help me)..

    In the "Request Help" screen, what sort of information would be good with regards to requesting help? What would you want to know about a person and their needs in order to consider giving them help?

  16. #16
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update: Created a service to get location updates. Right now it's started and stopped only where needed so it doesn't use much battery at all.

    Strangely.. this piece is something I was missing before when I was working on a turn-by-turn directions app. This is the right way to do it. Maybe I'll rebuild that app when I'm done with this one.

  17. #17
    Senior Member himespau's Avatar
    Join Date
    Jun 2008
    Location
    Louisville, KY
    Posts
    7,487
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by iconicflux View Post
    Okay.. couple of questions for people here.. (if anyone is actually reading these and wants to help me)..

    In the "Request Help" screen, what sort of information would be good with regards to requesting help? What would you want to know about a person and their needs in order to consider giving them help?
    probably need to know the problem, so you know if you're equipped to help.
    Punctuation is important. It's the difference between "I helped my uncle, Jack, off a horse" and "I helped my uncle Jack off a horse"


  18. #18
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got the reverse geocoding working tonight so it now knows the address you're doing it from and it's VERY accurate. It pinpoints my house address perfectly.

    This is so that you can send people that volunteer to help the actual address to pick you up from.

  19. #19
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got some of the code in today to have a working slider that tracks the dollar value someone is willing to offer for pickup. Also got the Google Maps API setup and functional so people can see where the pickup will be on the map (just incase there's a a failure of the gps system).

    Next up is to set up code to auto zoom into the location and put an overlay on it.

    Hopefully sometime this next week I can put out an early alpha with some functioning parts so people can check it out...

    Also.. I spent some time working on an algorithm for saving battery while doing turn by turn directions. It essentially gets your average speed and slows down the gps updates and then speeds them up again when you get nearer to your next turn.

    The app I'm working on may or may not have the turn-by-turn directions in them. I know people would really like them. The problem is creating an interface to build files of the right format. I was going to use ridewithgps at one point but they asked me to work with someone else and we just never hit it off. Then I never got another response from them when I asked for the access to the api without that person. Any javascript whiz's out there?

  20. #20
    Fredly
    Join Date
    Jun 2010
    My Bikes
    Surly Long Haul Trucker w/ SRAM Rival, & 36H 38's, Late 70's Santana Tandem w/ Double Diamond frame
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Took a short break from working on it because I got too busy with work.

    I've been working on changing the mapping over to OpenStreetMaps right now. The first part of this is building a tile server so that I can serve my own tiles. Then I'll convert the recent code to using OpenStreetMaps.

    Once I have that done, I think I'm going to work on the turn-by-turn directions before adding the code for alerting 911 to a cyclist in distress. I know I wasn't going to add it into this app originally but it seems to me like people would really appreciate an app that did turn by turn directions.

    My hope is that once I do it for this app that some of the bigger apps may be able to take my code and do it with their own.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •