Building Neighborhood Cats 1.0
Back in March, as my final project for General Assembly’s Android Development Immersive program, I decided to build an app I’ve had in my head for a while. It’s called Neighborhood Cats, and is currently on the Google Play Store. Here’s the story of its development.
Backstory: In the neighborhood my wife and I previously lived in, every day we would pass stray cats as well as house cats (generally sitting in windows). We made a game out of it: we would each count how many cats we’d spotted each day and I would take photos of cats we spotted together. But over time we’d disagree on which block we’d spotted each cat, and the photos would get buried in my phone’s gallery as I took other (non-cat) photos, so checking the location was usually a hassle. After we moved to a new neighborhood, I set out to build an app that could organize our cat sightings and allow someone to better remember their feline friends and where they saw them, with the additional ability to visualize those sightings on a map.
The problem: Organizing your cat photos in a photo gallery app is not efficient. Albums get buried over time and they don’t easily filter onto a map.
The solution: Neighborhood Cats is a photo-sharing app for Android that lets you keep your cat sightings organized and accessible while retaining the ability to show the world the adorable (or jerky) cat you’ve encountered. Maybe you just want to share it, or maybe you’re trying to get help for it.
Here is the presentation I made after I’d built my version 1.0. It illustrates the evolution and process of building version 1.0 fairly well.
And so, with hard work and some compromises, I created the first working version of what was previously only an idea in my head, and in just one and a half weeks. Considering that I hadn’t previously worked with many of the elements that went into it (recycler views, card views, Picasso, Google Maps API with placemarks, the Camera API, converting latitude and longitude to be an address, the Share Intent, and Google Analytics), I was pretty satisfied with where I landed by my deadline. But I was also disappointed that many features hadn’t make it in yet.
So much more needed to be — and still needs to be — done.
Neighborhood Cats 1.0 was released to the Google Play Store in early April. Then I spent a week bug-fixing: the map would start the user out at the center of the earth; and launching the camera from the app would crash Neighborhood Cats on some devices. (No big deal: that’s just the crux of the whole app.) After a lot of research and beta testing, I learned (the hard way) about the camera needing to be handled differently across different devices because device manufacturers implement their cameras in different ways. That wasn’t something mapped out in the Camera API tutorial, so I did some digging (“There HAS to be a library for this… right??”) and found open source code that handled the camera on the most popular devices. Once I connected it to my existing code I was able to resolve the camera crash. (Phew!)
Then I realized I’d forgotten to handle the activity lifecycle case of rotating the camera after you’ve launched it via an intent. What happens there is, like with any other activity, the activity is destroyed on rotation and recreated as the rotated version. This is very bad… because it means the camera activity loses its callback to the app and doesn’t know how to save your cat photo, causing a crash. That was actually really easy to solve by saving the configuration instance.
Further bug-fixes & clarification
One thing I still can’t seem to work out is why the first photo saved does not actually save to the app. The photo itself saves to your phone but it doesn’t exist in the app. I at first thought it was because I shipped the app with an existing .db file but had a “CREATE TABLE” call in the SQLiteOpenHelper’s onCreate() method, but getting rid of the file or getting rid of the create method didn’t fix it. I’m still researching this. Not only is it massively annoying, it will absolutely cause people to immediately uninstall the app and think I’m a jerk. It’s marked on my Github issues list as “high priority.”
It’s also not clear to a new user what to do once they’re in the app. I assumed that people would just go ahead and try the buttons they can see. When you go into the app there’s just a paw button and a map button. Tapping the map button initially just shows you a map with your current location since you have no cats saved yet. And the paw button launches the camera so you can add a new cat to your list. However, in user testing I found that it wasn’t necessarily true that people will just try the buttons in an app (even when there are only two), and especially so for people who don’t use apps nearly as much as I do. So I added basic instructions to the home screen that disappear after you’ve saved a cat to your list.
Upcoming Major Features
The original intention has always been to connect the map to some sort of community network in which other users can upload their cat photos and notes and their sighting locations to create a community of cat sightings. It could not only help tighten a community (especially with commenting or some sort of interaction enabled), but could also help people find their lost cat or identify cats that need to be spayed or neutered. This public map feature happens to also be my most requested feature, so I regret that it wasn’t available at launch. It’s definitely in the works, but bug-fixing and usability improvements have had to be the priority.
I’d also like to add a list of nearby animal shelters to the map. I’m still deciding on which API would be most appropriate for what I have in mind, and I’m still considering what info and how much of it I want to display. This will come before the public map, since the public map will require a lot more time and work to implement.
If I could devote all of my time each day to this project, these fixes and features would be a lot farther along. But unfortunately that’s not the case, and I appreciate your patience as I nudge this app into what it is truly intended to be! Thank you for coming on this journey with me 😀.