COVID-19 has brought out the best of humanity. The airwaves are filled with stories of people donating money to charities, food to food banks, and homemade masks to hospitals. While these efforts lack the coordination and the reach in order to help those who need the most help, they are a testament to people's willingness to help. And it is that willingness to help that inspired me to make my app.
What it does
My app helps people to share what they have with each other, whether it's extra food that might go waste, a homemade mask, or toilet paper.
Anyone who has something extra to share can log into my app, and click the "Donate" button. From there they input information about what they are donating. Using GPS my app identifies the location of the donor and pinpoints their location on a map with an icon that corresponds to their donation. People who are "in the area" can view these donations on a map, where they appear as icons. They can read more information about the donations and coordinate with the donor to pick up the donation if they choose to. The app seamlessly integrates with the Google Map API allowing for the donee to get directions to the donor's house with the click of a button. In addition to this, the donor can coordinate a time for the donee to arrive, allowing for the donor to leave the donation outside and thus maintain social distancing.
How I built it
I built this app using Android Studios, which uses Java and XML. In order to provide the map view, I used Google's Google Map API which additionally allowed me to annotate the map with icons. However, in order to sync those annotations across the Web, I needed to use Firebase, a cloud database built by Google. In particular, I used Firebase's Realtime Database in order to store and sync edits between clients. In order to keep the information stored in the Database a bit more secure, I used Firebase's Authentication in order to guarantee that only registered users could view and edit the data.
Challenges I ran into
I ran into several challenges while working on my project. My first challenge came when I attempted to integrate Google Maps into my app for the first time. In order for Google APIs like google maps to work, you need to have the Google Play Store installed on your device, this usually is not a problem because most Android devices come with the Play Store preinstalled, however, emulators don't have come with the Play Store installed. In the end, after trying for at least an hour to get the play store to work on my emulator I decided to switch to a physical device.
My second challenge came when I was trying to make a dialogue box. In order to make a dialogue box or a "pop-up" you first need to create a layout XML file, then you need to get a reference to the file, inflate it, display it, and then dismiss it. When inflating a file, what you are essentially doing is getting a copy of it and attaching it to the root and just because a popup is hidden doesn't mean its deflated. To cut to the chase, the issue that I ran into was that I was attaching elements with identical ids to the same root. To solve this issue I made sure to only inflate my dialogue box once.
My third challenge came when I tried to make an autocomplete textbox for the address picker. Because the elements that I was using to create the textbox (the PlaceAutocompleteFragment) were depreciated, and there were no working alternatives; it took me a long time to get the autocomplete textbox working and to configure it to suggest locations near the user's current location.
Accomplishments that I'm proud of
While it was definitely hard to do, building a functional multiuser geospatial app in the space of a day is an accomplishment that I am definitely proud of.
What I learned
I learned a lot from this project. In particular, I learned how to make multiuser mobile applications and how to use Google Cloud APIs.
What's next for vShare
The next step for vShare would be to set up an in-app messaging system between the donor and the donee so they could more effectively communicate.