The Android Huddle #0
Thursday, August 25, 2016
The Android Huddle is our monthly roundup of the best links shared in the Black Pixel Android team’s Slack channel.
Cleanliness
Our Android team has ongoing conversations about what it means to create clean, maintainable code. One common source of discussion is “Clean Code: A Handbook of Agile Software Craftmanship” by Robert C. Martin. While written with Java in mind, the principles can be applied to all languages. Our team uses it extensively during the programming cycle, including code reviews. It’s an easy read with great examples. Any developer can benefit from a refresh on writing high-quality code.
Speaking of creating high-quality code, clean architecture is explored heavily in Uncle Bob’s Blog. Whether we’re writing new apps from the ground up or just refactor existing code, we actively apply these principles. Architecture evolution is something we see constantly and we strive to do it well.
New Shinies
Android Nougat was finally released publicly, and our team is keeping an eye on its new approaches and capabilities. Its native multi-window support opens up interesting user interface options, not only on mobile devices but also set-top boxes. Enhanced accessibility and notifications as well as advanced security measures will help us create a more comfortable and safe experience for our apps.
Adoption of new technology can be slow sometimes, especially during active projects. However, as features of N become more prevalent, we’re excited to use aspects of Java 8. Keeping code cleaner and more readable with Lambdas is of particular interest. And anything to speed up development and debugging efforts has our attention.
Google Cast v3 SDK
We’ve done a lot of exciting things with Google’s newly released Cast library this past month. We’re looking forward to compiling these experiences into a tips-and-tricks article soon.
Tips for Accessibility
Recently we came across a talk at 360|AnDev put on by Kelly Shuster titled “Android is for Everyone.” It’s a nice refresher session that demonstrates why accessibility is important in Android apps. While the talk itself is certainly high level, Shuster provides several specific accessibility scenarios with ideal, easy solutions, in addition to some cool new accessibility features we’re looking forward to with Android N.
When in China
Last spring, our team was challenged with an app that needed to be deployed in several Chinese app stores, one of which did not deal well with obfuscated images included within the package. In order to get the app accepted by this specific store, we had to set the app icons to not be included in the DexGuard obfuscation process by using the -keepresourcefiles res/** option. We later found a great Tips and Tricks presentation that we wished had been around earlier.
Dagger
Our team has been utilizing dependency injection in recent projects. There is a lot to learn here, but a great place to get started is Fernando Cejas’ post about his experience with Dagger 2 on Android.
There are a couple of good examples to explore on GitHub as well, including this one and this one.
Gotchas
Sometimes, the simplest things can cause the most grief (and time) when you’re coding. Here are afew thoughts to file away for later:
For more insights on design and development, subscribe to BPXL Craft and follow Black Pixel on Twitter.