Full Stack Developer
Android App

I developed this Android app (demo here) using Java, Android Studio, and the SDK tools. I designed the data structures, interaction model, and application logic. I quickly learned about Android layouts, widgets, media tools, performance monitoring, debugging, and the Gradle build system. Though we put the project on hold for business reasons, I continue to tinker with the app in my spare time.

Architecture, Coding, Tuning

1. Cloud Architecture

The larger architectural context of the Android app was a cloud environment where videos could be stored and shared, metadata about "bubble" annotations could be stored and delivered dynamically along with streaming media, and sharing could be enhanced by user authentication and identity management. One of our consulting team members had extensive experience with Amazon Web Services (AWS), so he and I created this general blueprint based on AWS services. These services would save us time and provide potential for unlimited scaling. However, our initial focus was on UX prototyping and market testing, so we did not get to building out this infrastructure.

2. Android APIs

While I have written product-level code in C, C++, JavaScript, and even Java in the past, I have not coded anything for mobile or on Android. As I often do with new technologies, I taught myself with online tutorial and code samples from places like Stack Overflow. And while I have coded with many UI libraries, some of the Android APIs listed to the right/below were new to me. For example, the use of touch gestures, speech recognition, and the animation framework were all fun challenges.

3. Database Design

I kept the database design for the prototype very simple and started with the Android SQLite database. There were only three tables, one for users, one for projects owned by users, and one for comments that belong to projects. This made for very simple and fast code, but whenever a new feature required a new column in a table, the database needed to be migrated and that was a pain. In future, I would look at using NoSQL for easier app upgrades and asynchronous sharing across the network.

4. Debugging

I have done a lot of testing and debugging of web applications in the past — testing on multiple browsers, operating systems, and release levels. And I have done testing of responsive web UIs to see how they respond in different resolutions and aspect ratios. However, the different device testing for the mobile app was a new experience for me. Choosing the right minimum SDK level and testing on both tablet and smartphones was a start. We had only scratched the surface with our testing — even a small percentage of the Android devices out there would be a challenge for a small company.

6. GPU Performance Tuning

Another area that was a learning experience for me was performance testing in the mobile environment. When my app began showing trouble keeping animation smooth and bubbles appearing at the right time, I investigated Android performance and learned a couple key lessons. I learned to use the developer tools to view and minimize the GPU overdraw caused by layers of layouts and objects. I also learned to keep an eye on the GPU rendering to ensure it stays below the 16ms threshold. The latter required some restructuring of my code to shorten the code path for displaying bubbles.

6. CPU / Memory Tuning

Two other areas that mobile coding taught me to have respect for were memory and CPU usage. When I first started tracking this, I found that my memory usage was continuing to rise even though I thought I was releasing cursors and objects. Some restructuring of my database calls corrected this and I would see the garbage collection reclaim the rising memory. Similarly, like the GPU rendering, my CPU usage was much higher than it needed to be because of the code path of displaying bubbles -- when I reduced that code path to get GPU rendering below 16ms, I also saw the CPU usage drop significantly.