Over the past few months, the world has seen what young people can do when they organize around common goals. Many people want to make change, but they're not sure where to start. Although it seems like a small action, emailing or calling representatives can have a huge impact. Such an impact is seen in Colorado, where Elijah McClain's life was taken at the hands of police brutality. After public outcry, the governor of Colorado has appointed a special prosecutor to reopen investigation into Elijah McClain's murder. Justice for Elijah may have been neglected if the public didn't rally for his life. Sometimes its difficult to find the right words. This Android app, Amplify, combines the voices of citizens to guide those seeking change through the process of contacting their representatives.

What it does

This app has two main features: (1) send emails to your representatives and (2) see what other people in the country are writing to their representatives about. In order to send an email to your representatives, the app prompts users to enter their address. After entering their address, a list of all of the user's representatives are listed along with their political affiliation. Users then write the subject and body of their email and send it to their representatives in the app. If the user chooses to, they can share their email subject and body with other users for inspiration. All users can visit the 'Find the Right Words' page to see a map of what other people around the country are writing to their representatives about. Users can visit the 'Find the Right Words' page if they're looking to become more aware about issues around the country, learn from the perspectives of others, or find inspiration for their own letters to representatives. This entire app was written during HackItShipIt.

How I built it

Amplify is an Android app that I wrote in Kotlin. Amplify leverages the Google Cloud Platform in several ways. First, Amplify uses the Google Cloud Platform to make requests from the Google Civic Information API and Maps SDK for Android. Secondly, Amplify stores all user messages in a Realtime Firebase database. When a user enters their address, the app makes a request to the Google Civic Information API for their representatives. When the user is done writing their letter, the app writes their address, subject, and body to Firebase. When the user visits the 'Find the Right Words' page, the app reads all of the submissions from Firebase and places them on Google Maps with markers via the Maps SDK for Android.

Challenges I ran into

The first challenge I ran into in this project was parsing the JSON response from the API request to a Kotlin object. I've never worked with JSON before (I have only used Protobuf), so I had a difficult time understanding the structure of the response and how to extract the data I needed. Fortunately, after some YouTube tutorials, I was able to nail it. I also ran into the challenge of reading the user data from Firebase. After reading more of the Firebase documentation, I was able to figure it out.

Accomplishments that I'm proud of

I'm proud that I was able to use the Google Maps Geocoder to map user addresses to latitude and longitude. This was one of the last tasks I completed, so I was running out of steam. I was able to push through, and as a result, the app accurately places the markers of different submissions on Google Maps. I'm also proud that I was able to use Firebase. This is my first time working with a database in any of my projects, so I was intimidated by how I would get it working. Fortunately, Firebase is pretty simple to use and there's plenty of documentation!

What I learned

I learned how to make an Android app that makes API requests. I've never worked with the Google Cloud Platform before, so I learned by creating a new project in the Google Cloud Console and the Firebase Console. I've just scratched the surface of their capabilities, so I'm looking forward to exploring more!

What's next for Amplify

Right now, there isn't any email integration for the app. The app is just storing user submissions in Firebase. I would like to add Gmail integration so users can send their letters in the app. I would also like to improve the interface for the Google Maps markers by making a custom marker. The custom marker would allow the app to display the entire user's message, rather than a snippet. In addition, users should be able to select which representatives they would like to send their letter to.

Share this project: