Inspiration

I have a friend who moved from Barcelona to Cambridge a month ago to do her college dissertation. Back at home she used to walk everywhere, even at night, but she finds herself now in a new, unknown city, and she doesn’t feel safe like she used to. In Spain we have a very active street life and if you walk in crowded streets you can feel safe because there is people that can help you if you have to face a tough situation. However, here in Cambridge she has found herself coming back through dark, lonely streets, what has made her feel less safe when walking alone on the street. The first time she had to do it, she sent me a message telling me she had about 40 minutes of walking, she attached her location and she asked me to call her if she hadn't said anything by the time she should have arrived. I thought it was a great idea, it obviously made her feel way safer, but I thought about improving it by automatizing the send location flow. The reason why is simple: if she were in a situation were she found somebody approaching her in the street, she would need to pick up her phone, look for the chat, think what to write, type it, search the location and send it. During all this time she would be focused on the phone and not on the person approaching her, making her more vulnerable. I thought that it would be great to let her send the messages without even having to look at her phone.

What it does

The app listens for the user to draw a specific pattern on his/her phone, and when it is recognized it triggers the action of sending the location and a custom message to whomever he/she has configured to.

How I built it

I used Android Studio and Java for developing the app. To detect the gestures I have developed a gesture detector that stays on top of the menu screen from the moment it is launched. There is a gesture library to do the pattern matching, and if the pattern drawn by the user matches the one in the library the action is triggered. In this case the action is to send the current location of the user and a custom text to the contact specified in the settings. It does it through either telegram or whatsapp, depending on the user preferences. The telegram implementation is quite straight forward, it uses a telegram bot that I have created specifically for this app. The Whatsapp implementation is a bit tougher, Whatsapp allows you to type in a text to a specified chat inbox, however it doesn't send the message automatically, it relies on user action. What I have done is integrate the Android Accessibility Service, so that once the message has been typed in, the Accessibility Service "clicks" on the send button.

Challenges I ran into

As I said, the implementation of the Whatsapp flow has been difficult, the proposed solution is nothing but a work around, and isn't 100% reliable. Also, the google URL for generating a Google Maps message has changed a lot during the last years, what forced me to test 5 different URLs until I got to a working one.

Accomplishments that I'm proud of

I'm really proud of having been able to develop a complete app on my own, from the name and logo design, to the front-end (a bit rudimentary), the back-end and integration of all services.

What I learned

I've refreshed a lot of Android and Java (it had been more than 4 years since the last time I used this tools), I have done a lot of research on communication channels and their advantages and disadvantages, and I've found a way to recognize drawn patterns from "outside" the app what I find truly cool!

What's next for FeelSafe

The next steps are the following:

  • As I said there is some tech debt on the Whatsapp integration that I'd really like to solve
  • The front-end would really appreciate some designs and styles
  • I would like to add a new functionality that activates the voice recording app when seeing another specific pattern, to tackle Sexual Harassment in the workplace (i.e in a non professional one to one meeting with your superior)

Built With

Share this project:

Updates