Inspiration

Crime is everywhere these days, especially if you live in a big city like me. Hence, we really need a good crime reporting and alerting app. But I wanted to do more than just a simple panic button app. Everyone has heard of Google Maps and Apple Maps. These applications have been an essential part of our daily lives, allowing us to travel faster and more efficiently. However, in the modern world, there are many areas that feel dangerous due to their high crime rates, such as Skid Row and Compton (which is the 4th dangerous city in the U.S.). Because of these persistent crime trends, we tend to feel unsafe traveling through neighborhoods that are threatening toward our personal well-being. With a focus on putting pedestrians and commuters at ease, we decided to create CrimeWatch, a user-friendly crime reporting/notifying and mapping platform that focuses on finding the safest travel route between two locations, allowing for city-dwellers to avoid spots more prone to dangerous activity and encouraging peace of mind in city travels.

What it does

By navigating through our simple, stream-lined UI, users are also able to report recent criminal activity and alert the authorities, allowing for the community to be better informed through realtime data, and thus more aware of areas to avoid during their daily commute. When there has been a crime reported within 2 hours, you will get a notification that a crime has happened, and you can view the crime on the feed, or open the map to check for the red markers (active crime site - less than 2 hours old). You can also view the crime sites within the last 2 weeks in your area in the maps -which are the yellow markers. CrimeWatch also allows users to input a start and destination location, and find the safest travel route between the two locations for both pedestrians and drivers. The app visualizes the route on an interactive map and provides step-by-step travel directions, along with detailed map markers that indicate unsafe areas where crime has been recently recorded.

How we built it

Android studio, Firebase, Kotlin, HERE API and Google Cloud products(Maps, Directions, Geocoding, Places). Usre accounts will be generated with Google OAuth for our Firebase Firestore database. We also have a bucket for the images the users if they upload when they make a post. Those posts are displayed with a RecyclerView on the feed. There is also a map made with Google Maps API. When we search for a place by place name and not address, the Places API will match that location name to an address so we can put down a pin. We also use Google Geocoding to translate these addresses into a latitude and longtitude so we can put down markers. By default, paths are generated by the Google Directions API. However, the Directions API does no have the option to avoid a point so when our path coincides within a 100 meter(can be changed) radius of a crime marker, it switches over to the HERE API. The reason for this being the Directions API also has Waze/traffic accounted and also traffic incidents, while we only can get the shortest route while avoiding crime with the HERE API. So Google Directions always generate the fastest route in real life, while HERE does a hypothetical one. The polylines for both APIs were retrieved using a HTTP get request, then parsing out the JSON to get the polyline. Then I used PolyUtil package to decode the polyline into a list of latitude and longtitudes, then draw it as a polyline on the Map.

Challenges I ran into

Trying to fit everything in a very short amount of coding time. Using Firebase and google log in is always a challenge. Getting used to fragments, models, recyclerview, adapters, etc. Working with a big variety of APIs means that lots of documentation reading and confusion.

Accomplishments that I'm proud of

We have built a functioning app, with most of the features that we had originally planned for. The UI is very clean, though could be better if we had more time.

What I learned

How to use RecyclerView, fragments, models, adapters, Firebase, google maps, google places, google directions api, HERE routing API and google log in.=

What's next for CrimeWatch

I want to add more features to the app. I also want to expand the UI, and make it more user friendly.

Share this project:

Updates