Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Android devices have hundreds of different hardware configurations, from advanced TVs to very basic phones. Writing an application that runs perfectly across the whole spectrum can seem like a daunting task. Android, fortunately, provides many tools to handle the ecosystem on which it runs. In this chapter, I’ll show you how to leverage Android’s layout folder hierarchy system, configure your manifest to ensure that your application is available only to phones that can run it correctly, and handle older versions of the Android SDK. Android’s diversity can be a challenge, but I’ll show you how to use the available tools to make it a manageable one. This chapter covers the secrets of the res/ folder; weeding out devices with the manifest; and accommodating older phones with reflection.