In a way, five separate sparks of inspiration led to the formation of this one app idea.
For Angela, the spark came at Rendezvous, where she saw tape spaced 6 feet apart to guide students waiting in line for food. Tape isn’t environmentally friendly. Tape is boring. A solution came knocking on her noggin a few minutes later.
For David, the spark came from his early morning tradition of trawling Reddit for an hour before forcing himself to get up right before noon. During what seemed like a classic mindless meme consumption session, he suddenly came across an image of Wisconsin dads having “social distancing beers”, without any way of marking their distance from one another. What if we could solve that?
For Ray, the spark is fueled by his concern for his dad, who continues to work as a dentist despite the heightened risk of contacting patients with COVID19. He wants to remind medical professionals to always keep a distance away from anyone as much as possible, even if they work in such difficult and crowded times.
For Rishi, staying at least 6 feet apart from another human being has always been an issue. He always has to bend his neck just to talk to his friends! Another “perk” of being 6” 4’...
For Justin … it was a little more complicated. As a current senior and future P.h.D student, there’s definitely a big experience gap with the other four members, who are all first-years. For him, LA Hacks presented the opportunity to serve as a mentor and brotherly figure to these upstart first-years and an outlet to enjoy his last-ever undergraduate hackathon.
In the end, even though there was much debate over the implementation and design of the app, we were focused on the goal of making social distancing less stressful in an already very stressful time. That is the goal of our project.
What it does
r u safe, buddy? is an iOS app that monitors one’s distances to other nearby iOS devices running the application. When the app is started, users are directed to a welcome screen, where a click of the screen will begin a scan for all nearby devices. If there are no other phones detected, a screen will pop up alerting the user that nobody was detected nearby. Otherwise, if there are other devices detected, the app switches to a different screen and plays an audio recording depending on proximity. If the detected device is within around six feet, a red screen will pop up with a warning message and an audio playing “Danger, Danger!” If the detected device is within around 6-7 feet, there is a warning message played, and if a device is further than that a green screen with a safety message is displayed. As you move closer or further from other devices, the screen will seamlessly update, giving you an up-to-date status on your social distancing from others.
How we built it
We used Swift for the iOS development, but the main technology used to build the app is iBeacon, an Apple protocol. Traditionally, beacon technology is used in places like mall shops, where a physical beacon device in the shop (a small, wireless transmitter) would detect shoppers who open the store’s app to send targeted advertisements and discounts. Our application works in a similar way, except it bypasses the need to have a physical transmitter serving as a detector. In r u safe buddy?, we used the iOS Core Bluetooth framework to transform the device into a beacon, while simultaneously using the iOS Core Location framework to begin detecting other beacons nearby, eliminating the physical beacon middleman and detecting other devices with … your own device. In terms of measuring distance, we based our values on the detected beacon’s RSSI score, which measures signal strength in decibels. Using this score, we are able to extrapolate the distance and adjust the display accordingly.
Challenges we ran into
Proximity proved to be another major issue, as our team was unable to collaborate in person. Utilizing Google Hangouts, Messenger Video, and ZOOOOOM, we were able to make the most of the circumstances, but there were many parts that would have been much more efficient had we been able to collaborate in person. For example, since the implementation of the app required multiple iPhones to test, all the tests had to be done by a single member, who always had to be ready for a call to test a new feature.
Towards the end of the hacking process, frontend proved to be our nemesis. It was tough getting each screen to transition and show up in the exact way we had planned, and frustration began setting in knowing that we were oh-so-close to finishing but had to deal with small visual bugs that would annoy us to death had we submitted without fixing them. Patience proved to be the best solution, as we were only able to solve the issues with all five of us huddled together on video call, testing the results line by line until reaching the desired output.
Accomplishments that we're proud of
We are proud of learning quickly and efficiently on the go. This was the first major hackathon for four of our five members, and we had no idea what to expect. We were pleasantly surprised, however, that implementation went relatively smoothly for a first hackathon. Of course, a veteran like Justin who was learning on the fly with us gave us a lot more confidence to tackle the project, and an idea that we weren’t sure was even physically possible turned into an actual product within the course of the weekend.
What we learned
Prior to LA Hacks, our quintet’s combined experience in Swift was … nada. None of us had ever created an app before, either for iOS or Android, and learning the structure of iOS development was something totally new to all of us. None of us had also ever heard of a beacon before LA Hacks, nor had we ever built a Bluetooth compatible device, so using those technologies was a revelation for us. We also learned a lot about working together and keeping up the positive spirit even after hours of writing code turned out to be wasted. This app is something that all five of us can look at and see elements that each of us individually thought of on it, and that’s something beautiful about our app.
What's next for r u safe, buddy?
We have a couple of functionalities that we wanted to implement but were restricted due to resources (in terms of time and knowledge). This includes running the app in the background consistently and detecting not only other app users but any phone’s signals. In addition, we want to make it Android-compatible and maybe even smartwatch-compatible. We hope to use this as an opportunity to portray social distancing as a non-hassle, efficient way to dramatically decrease the impact of COVID19 on our lives individually and all together as a society.
Try It out
avfoundation, core-location, corebluetooth, ibeacon, swift, xcode