I’ve been working with Firebase lately in preparation for adding data synchronization to my Music Library app. Their docs did a great job of getting me set up. Using the sample app as a guide, I even got Google+ OAuth working without much trouble. From there, it didn’t take long to load data into a Firebase instance partitioned by Google account. All that was left was to query the data out of Firebase and I’d be able to see the sync magic in action.
... ➦I thoroughly enjoyed my last night in Berlin a little over a week ago; so much that I didn’t notice my phone was missing until the end of the night. Shake your head and say it couldn’t happen to you. I thought the same thing until it did. Normally, I keep my phone in one of my front pockets, but I was wearing a coat that covered the pocket, making it a bit more difficult to grab my phone quickly to check Google Maps. Since my coat has a side access pocket in the chest, I stowed my phone there while walking around. I’m guessing a skillful thief at the last bar spotted my phone in that side pocket and was able to slide it out without me knowing. I was in a crowded room and often looking to one side as I talked to different people. Self-shaming thoughts aside, sometimes it happens.
... ➦It was an honor to speak at and attend MCE Conference in Warsaw last week. I participated in a workshop where I learned about prototyping with Android and Arduinos. I attended talks about Groovy, Kotlin, Proguard, design, scaling apps for emerging markets, and some handy new libraries.
That alone easily makes MCE one of the best conferences I’ve been to. On top of all that, the networking with fellow speakers and attendees was a personal highlight. To everyone I met, I hope to stay in touch until our paths cross again. And I hope you caught up on your sleep!
... ➦A few months ago, I posted about how to use Gradle tasks to “delombok” code using Lombok annotations before generating Javadocs. My solution for running the delombok task used Ant and was based on what I found after the requisite Google & StackOverflow searching. This worked just fine until Android Studio 1.0 and the associated Gradle build tools were released at the end of the year.
The crux of the problem appeared to be a change in the way dependencies are merged during compilation. Countless “package does not exist errors” were causing the delombok task to fail. I first attempted to solve this by changing the way the classpath was built in the task. While I was able to reduce the number of errors, I didn’t succeed in completely fixing the problem. All the while, running the delombok task directly from the command line with java -jar build-libs/lombok.jar delombok src -d build/src-delomboked
ran successfully.
The end of another year means it’s time for the annual Top 10 Favorite Albums list.
I made a YouTube playlist with one of my favorite songs from each album. Enjoy!
... ➦Over the years, Music Library has been a playground of sorts for exploring various open source libraries, patterns, and best practices. While there is still a fair amount of code I would write differently today (I’m looking at you, ContentProvider), the app has been and continues to be an enjoyable side project.
... ➦This is my third year to attend and present at the Big Android BBQ. My talk this year showed how to prepare an Android app for automated testing using mocking, dependency injection, and Google’s super fast Espresso test runner. You can find the presentation on Speaker Deck and the sample code on GitHub.
As I mentioned in my last post, I’m developing an SDK at work. The libraries I use most frequently in my apps are all included as Maven dependencies. Adding a line to my build.gradle
file is much preferred to downloading a JAR file. To make the SDK as easy as possible for developers to include in their projects, I wanted to deliver it the same way.
Maven Central is the de facto repository for open source library hosting. Since the SDK I’m developing is part of a product and as such will not be open source, I needed to find another place to host the binary that would still allow it to be included via Maven.
... ➦I recently had my first experience working with Javadoc to generate documentation for an SDK I’ve been developing at work. In general, I’m in the “clean code doesn’t need comments” camp, but SDKs tend to be a limited view into a larger abstraction, so good documentation is a necessity.
Javadoc has been around since the introduction of the Java language, so I won’t include a primer here. If you want to learn more, Oracle has you covered.
... ➦Since Android Gingerbread (v2.3), loyalists know that each version has an Easter egg that can be accessed by repeatedly tapping the version number on the Settings > About screen. The Android “L” Preview is no exception.
While test driving the new version, I naturally had to see what Google had hidden for me in their latest release. Previous versions have had everything from gingerbread zombies to Nyandroids and a pile of jelly beans. The Android “L” Preview build has a simple animation of random overlapping red and blue rectangles. Several Android blogs mentioned this, but dismissed it as mysterious and strange. While these random rectangles are clearly the same used by Google’s WebDriver Torso YouTube video quality testing, so far everyone seems to have missed the most obvious explanation.
... ➦