Looking back on 2015, I'd have to say it was my year of "breaking free". I finally started to do many of things that I had been only dreaming of for the past several years in my career as a Software Developer. Instead of feeling like I still didn't know enough, I embraced what I did know and used that to increase my visibility in the Android Community. So here's a recap of some of the highlights.
My 2015
Looking back on 2015, I'd have to say it was my year of "breaking free". I finally started to do many of things that I had been only dreaming of for the past several years in my career as a Software Developer. Instead of feeling like I still didn't know enough, I embraced what I did know and used that to increase my visibility in the Android Community. So here's a recap of some of the highlights.
Creating Your Own Video Course, Part I: Preparation
I recently launched my first video course: Developing High Quality Android Applications. It was a significant undertaking for me. But through good planning and execution I was able to create a 2 hour course with over 40 videos in just about 2 months, while still working full-time! So while everything is still very fresh in my mind I wanted to share how I was able to do it.
This is going to be a three part series where I break down the Preparation, Execution, and then Marketing of the course. Hope you find this information useful and you can use it as a reference for your first course! So let's get started...
Testing Tricks #3: Third Party APIs

When you're writing unit tests for your Android applications, you will often need to handle interactions with third party APIs. In the above image we're using the Picasso Image Loading library in our classes. Picasso has a very clean API, so it's relatively simple to work with; but with other libraries you may not be so fortunate. So what can we do to simplify our interactions with those APIs and also set ourselves up for more maintainable code in the future?
Testing Tricks #2: Finding UI Views
When you're writing Espresso tests for your Android applications, you will often need to reference the resource id of a particular view in order to make your assertions. Instead of digging through code you can take advantage of the UIAutomatorViewer tool. It's very simple to use and helps you to visualize the hierarchy of the views in your application.
Learning RxJava for Android Devs
One of my goals this year was to learn RxJava. Similar to my goal of going to the gym, I procrastinated a bit.
What have you found useful? Share in the comments. Thanks!
Learning more about #RxJava is actually on my todo list for this year. Can't wait to watch! 👍 #androiddev https://t.co/P4hF6A553z
— Annyce Davis (@brwngrldev) October 28, 2015
However, I have recently been digging deep into RxJava, especially as it's used in Android applications. Figured I'd share some of the resources I've come upon to help others in their reactive journeys.Resources:
- Introduction to RxJava...
- Grokking RxJava
- Learning Reactive Programming with Java 8
- RxJava Essentials
- Where to Start
- RxJava Examples
- RxMarbles Site
- RxMarbles App
- Tweet wrong-ish RxJava code, get corrected by dozens of people around the world ;-)
Mission accomplished! Using #rxjava in my first #Android app now. 😁 #androiddev #winning pic.twitter.com/FJ4dwjTeS9
— Annyce Davis (@brwngrldev) November 24, 2015
What have you found useful? Share in the comments. Thanks!
Testing Tricks #1: Dealing with "new"
As I continue my efforts to get my Android applications under unit and integration tests, I have come across a few tips/tricks to successfully deal with troublesome code. So I decided to start a new blog post series, "Testing Tricks". I will try to post a new trick each week. So let's get started...
Problem Code
So I wanted to test this code:
public void readDeepLink(String path) {
new DeepLinkReader().readDeepLink(path);
}
Just wanted to make sure the readDeepLink method was being called. The troublesome part is that I didn't want to create a actual DeepLinkReader because the real readDeepLink method made calls to the network. So what's the fix?
Solution
Wrap the call to the "new" creation in a separate method. That way I could override the newly created method with a mock. This would avoid creating a real DeepLinkReader object and would allow me to use Mockito to verify the mock's interactions.
Fixed Code
// in the MainPresenter.java
public void readDeepLink(String path) {
getDeepLinkReader().readDeepLink(path);
}
DeepLinkReader getDeepLinkReader() {
return new DeepLinkReader(currentData, events);
}
// in the MainPresenterTest.java
@Mock private DeepLinkReader deepLinkReader;
@Test
public void shouldReadDeepLink() throws Exception {
MainPresenter mainPresenter = new MainPresenter() {
DeepLinkReader getDeepLinkReader() {
return deepLinkReader;
}
};
mainPresenter.readDeepLink("washingtonpost.com");
verify(deepLinkReader).readDeepLink("washingtonpost.com");
}
Hope you found this useful, until next time!
Talk: Static Code Analysis
Studies show that for every 7 to 10 lines of code we write, we introduce one defect. Now often times we can spot these errors before they ever see the light of day, however that is not true in all cases. So what can we use to assist us in leveling the playing field? Well, we can take advantage of Static Code Analysis tools!
Conference: Android Summit 2015
This is how Android Summit started for me! A delightful dinner for the speakers where I had the chance to make some new friends; including the friendly conference committee lead by folks at Capital One.
Talk: Developing Maintainable Apps
Great Android apps only include what's needed to achieve the goals of the product, not enhance the resume of the developer. What’s more, the more maintainable an application is, the more likely it will have increased user satisfaction and decreased time to market.

So how can you do it? Keep these four factors in mind:
- Choose your 3rd Party Components Wisely
- Keep your Code Simple
- Use Static Code Analysis Tools
- Write Unit Tests
Resources:
- Clean Code - http://amzn.to/1DJybxH
- Effective Java - http://amzn.to/1Ku8Xel
- Working Effectively with Legacy Code - http://amzn.to/1Jqe1PA
- Unit Testing Idioms - http://goo.gl/Bx1WbL
- Google Code Style - http://goo.gl/8Pf6J3
- Architecting Android - http://goo.gl/UKvmbq
- Conquering Cyclomatic Complexity - http://goo.gl/lRoPXN
- PostTV App - https://goo.gl/0TRsXU
Testing Your Apps with AWS Device Farm
Recently, I've been on a mission to enhance the quality of the tests in the Android applications that I work on. To that end, I was introduced to the AWS Device Farm, a cloud based app testing platform.
Android Devs Listen Up!
So listening to podcasts used to be the "thing", then it wasn't the "thing" anymore, and now it's back to being the "thing" to do. So with that in mind I thought I'd share some of my favorite podcasts for Android developers.
Conquering Cyclomatic Complexity
Have you ever received a warning about Cyclomatic Complexity while working with a class in Android Studio? Would you like to know how to fix it? If yes, keep reading...
Android Testing, Why So Hard?! - Talk
Android devices come in all shapes and sizes, with varying performance levels and APIs. This is one of the reasons that writing tests for Android applications can be so daunting, let alone the seemingly endless number of tools available to write those tests. This presentation discusses three simple steps to get started with writing tests for your Android applications.
Slides
Resources
- List of Testing Articles/Videos: http://git.io/h6HQ
- Fragmented Podcast: Episode #1
- Android Workflow Guides: http://git.io/h67r
- Genymotion Emulator: https://www.genymotion.com
Various Android Testing Frameworks
![]() |
| Various Options for Android Testing |
Android: Overdraw, What is it and Why Should You Care?
I recently read this blog post, Android Performance Case Study by Romain Guy, on profiling an application that he used regularly to determine why there were occasional hiccups. I used one of the tools he recommended, Debug GPU Overdraw, to see how the PostTV Application was behaving. With one minor tweak I was able to reduce the overdraw by 1x. So what does overdraw mean anyway?
Subscribe to:
Posts (Atom)









