Everyone knows that the best way to fight COVID-19 is through Social Distancing. While many people in the world is now finally keeping themselves self-quarantined, it was not easy at first. Specially, in the relatively lower developed countries, the govt and the social organizations had a hard time self-quarantining people. Because, well i guess everyone likes to move around. Thats where our ImQuarantined app comes into play. We created a GPS based location tracker app, that tracks an individual's location and makes the whole process of self-quarantine very interesting through virtual points and rewards.
What it does
1. A background service will read a location from the gps once every 5minutes, communicate with our background server and verify that the user is indeed confined within a relatively smaller boundary.
2. A user can still stay in the game even if he/she is doesnt have access to network for a while with our Offline Mode.
3. If an user completes one such 24 hours i.e an entire Quarantined Day, he/she is rewarded with 100 Qpoints .
4. If he/she completes 3 such days in succession, he/she receives a 3-Day Streak bonus, similarly he can win streak bonuses for a 5-Day Streak a 7-Day-Streak and so on.
5. All users compete for a Top 5 position globally to receive a special reward. The current leaderboard can be viewed on the app's leaderboards page, where the user can find the players with the highest points, longest streak, total number of days quarantined etc.
6. If an user fails to stay at home for some reason his/her streak ends. But, he/she doesnt need to worry , a new streak is restarted automatically from that instance.
How we built it
We build the backend API using Python and Django, we built the mobile app on native android using Kotlin. We authenticated the users using Facebook Login through a Facebook App. We calculated latitude,longitude,altitude using on-device GPS and Pressure Sensor.
Challenges we ran into
- We used latitude,longitude and altitude to pin down a user's location. A major challenge was to calculate the altitude using the android device's inbuilt sensors. We tried to incorporate the gps's raw altitude and the pressure sensor's output to adjust and calculate a more accurate altitude.
- For devices, that do not have a on-device Pressure sensor, we used a standard pressure value and tried to calibrate accordingly. We built this in the last 3 days only and if we give more time on this, we can try improving this situation.
- Lastly, as we know making location requests can be a battery heavy operation, so it was challenging to find the right balance. But, in the short time we had, we experimented with the values and tried our best to make this as optimal as possible.
Accomplishments that we're proud of
Initially, we were not quite sure how accurately we would be able to build this given that, We came to know about the hackathon a little late, we are just two CS students :) . However, based on the tests we've done so far and the beta tester feedbacks, we are quite contented. Surely, theres room for improvement but, we are contented about what we did in the last 2-3 day sprints.
What we learned
We are two passionate CS students still learning their trade. We've participated in hackathons before but this was still a good experience. Starting from slack discussions to late night brainstorming on a line of code we've learned some truly interesting things. And whether its a small little syntactical issue, a design pattern or large block of complex logic we've enjoyed it.
What's next for ImQuarantined
One of our ideas behind building ImQuarantined was to make this boring and horrific self-quarantine process a little interesting. And in order to give people some more incentive, we've started talking to donators, if we can find a suitable donator we can convert the virtual Qpoints into actual Dollars$ through a suitable exchange rate and pay the money to the cause of treating COVID-19 patients worldwide.
Try It out
android, django, facebookapp, java, kotlin, python