Building Killer Android Tablet Apps: Design and Development Tips, Page 2
Testing Apps for Android Tablet Compatibility
Although few tablets have been released yet, nothing is stopping you from beginning to test your existing apps and ironing out the obvious issues. Here are some tips to keep in mind when testing for tablet compatibility:
- Testing on the actual devices (as opposed to the emulator) will be critical to ensuring your application behaves as expected. Some devices, such as Samsung's Galaxy Tab, have reported their hardware characteristics differently than expected. For example, despite having a medium-density screen, Samsung chose to have its new tablet report as a high-density screen because it looks better (see Figure 1).
- Some tablets may not include the Google "experience," so make sure you also test with Android Virtual Devices (AVDs) that do not include the Google add-ons.
- Tablets, among other devices, are beginning to take a landscape-first approach to the screen. Make sure your app displays properly in both orientations and handles orientation changes correctly (see this Android Developer Blog post for details).
Finally, one of the best things you can do right now to ensure your app is tablet compliant is load your app into the emulator with a tablet-style AVD configuration and see how it behaves. For example, use the following steps to create an AVD configuration that mimics how your application would display on a tablet much like the upcoming Galaxy Tab:
- Launch the Android SDK and AVD Manager.
- Press the New… button.
- Enter a name for the tablet (e.g. "Tablet Emu") and choose an appropriate SDK version, such as Android 2.2.
- Create an SD card (We use between 32MB and 512MB).
- For the Skin section, choose Resolution and enter "1024" and "600" into the appropriate boxes. If you enter 1024 then 600, the device will start in landscape mode. If you enter 600 then 1024, it will start in portrait mode.
- For the Abstracted LCD Density, any value will work (although the values 120, 160 and 240 are suggested). To mimic the actual screen density of the Galaxy Tab, enter 170. The device will be treated as a medium-density display. To mimic the reported screen density, enter 240. The device will be treated as having a high-density display.
- Choose Create AVD.
- When it's created, launch it with the Start… button.
- As the display size is rather large, you may wish to scale it down using the launch parameters.
If the rumors are true, the next major release of the Android SDK (Gingerbread) will begin to address some of the device differences in some official manner. Expect to see changes such as additional APIs for optional hardware, updates to the Android Manifest configuration options available for targeting specific device characteristics, and perhaps new controls and screen layout options. We are also likely to see changes to the Android Market to reflect the plethora of devices about to reach consumers' hands. For example, sources at Google have implied that certain application permissions (as defined in the Android Manifest file using the tag) may be used by the Android Market to filter apps for devices in the future.
In that future, Android-powered devices will likely come in many forms: phones, PDAs, music players, tablets and toasters. For now, one of the best things you can do as a developer is start to think along these lines. Be mindful of the assumptions you make when developing your apps, and consider how they will restrict or allow your apps to run on different types of devices. Review your existing apps and update them with more flexible user interfaces and prudent assertions on device features and characteristics.
With the introduction of Android tablets, developers now have a whole new range of devices to target with their applications. Android tablets are likely to boast larger and higher-resolution touchscreens, video output options, front-facing cameras and other optional hardware features -- at very reasonable prices. These features enable developers to write new kinds of applications and enter new markets. Developing Android apps for tablets requires some forethought, but many of the design principles for writing great Android apps for tablets really apply to all device targets.
About the Authors
Lauren Darcey and Shane Conder have coauthored two books on Android development: an in-depth programming book entitled Android Wireless Application Development (ISBN-13: 978-0-321-62709-4) and Sams Teach Yourself Android Application Development in 24 Hours (ISBN-13: 978-0-321-67335-0). When not writing, they spend their time developing mobile software at their company and providing consulting services. They can be reached at email@example.com and via their blog at androidbook.blogspot.com. Follow them on Twitter @androidwireless.
Page 2 of 2