Advance Your Android Knowledge: Tips for Android App Development

Both Android smartphones and tablets continued to sell well in 2013. However, the market is maturing, according to, a mobile measurement company that tracks more than 400,000 apps.

This cooling of growth has serious implications for engineers who specialize in Android app development: Building a better product matters more now than ever before.

Android fragmentation, despite some arguments to the contrary, is still an app development challenge. According to Google’s latest distribution figures, Jelly Bean has more than half the market. But with Ice Cream Sandwich and Gingerbread still over double-digit percentage use, your Android app needs to work on more than one set of APIs to standout. That’s why your first stop before you start building your next product should be the Android Dashboards page.

You also need to consider your target market:

  • Which customers do you want to target?
  • What devices do they use?
  • What functionality do they want?

Deal With Device Diversity

Your code will need to run on multiple devices with varying processors and speed — that’s a given. Using a shim activity to detect platform details is a common practice in Android app development. However, this can be trickier than it sounds. As an open source operating system, Android is often modified by hardware manufacturers before updates get pushed to users.

Tim Bray outlines a safe approach in this still-relevant post from the Android Developers Blog on “Identifying App Installations”: Create a unique identifier the first time the app is opened and store it in a shared preferences file. You could rely on looking up ANDROID_ID, however, be aware this identifier may get reset if a device gets rebuilt.

Keep Users Happy

Once you know the basics about device and operating environment, you can tailor your app for these elements. Designing for Seamlessness describes the high-level do’s and don’ts of Android app development.

You have lots of options for how to deliver a delightful interaction:

  • Think through the activities users will perform with your app, how you will organize those into tasks and whether you want to override the “last in, first out” default for task management. (Hint: In most cases, override is not the way to go.)
  • Apply your understanding of processing and threads to how you decide to handle intensive operations. You’ll want to use multiple threads and Async to prevent the dreaded “Application Not Responding” (ANR) dialog from appearing.
  • Consider which Android app development design pattern to use to provide the best screen support: Will you associate multiple fragments to one activity or multiple fragments to multiple activities? Each approach has pros and cons based on whether display logic is handled in a runtime operation or is predefined in the XML layout.
  • For graphics-intensive apps, you might forego using a shim and instead opt to use the hardware scaler, for lower power consumption and better visual quality.

Test to Become the Best

You applied good Android app development principles from the moment you planned your latest product. Now, it’s time to test your app on the devices you’ll support. Don’t skip these steps:

  • Debug the user interface — The Monkey program uses streams of pseudo-random events to mimic user behavior.
  • Check on memory usage — Take advantage of Procstats to get a quick overview of how much memory your app uses and for how long.
  • Verify your app takes out the trash — Kitkat, or Android version 4.4, introduced a “meminfo” to help you investigate and fix memory leaks.

Advance Your Knowledge

Even if you’ve mastered building apps for Android 4.0.x to 4.3, it takes effort to stay current.

Keep digging through Stack Overflow inquiries and GitHub samples, or attend one of the many Google Developers events on Android app development to refresh your skills. When you’re ready to apply your skills in a new workplace, we can help you with that.

Use the comments section to share your tips for Android app development.