Chapter 3. Configuring Devices and Emulators
When developing mobile applications, it is necessary to test your code on many different devices. Because there is such a large variety available for Android (at the time of this writing, there are over 3,000 devices supported in the Google Play Store), this can be particularly challenging. It is necessary to test your app to ensure it runs well on the majority of devices; you also need to test out a few different screen sizes. You may also need to account for different hardware capabilities, including OS levels, existence of sensors, amount of memory, or CPU. Fortunately, ADT provides tools that make handling these challenges easier. I’ll describe how to test on real devices, and also how to use emulators when the devices you need aren’t available.
Using a Physical Device for Development
For many activities, it’s important not to rely completely on an emulator, but to check your app on an actual device. For instance, this is particularly useful when you are testing advanced graphics rendering, utilizing location services, or making use of advanced sensors. It is not strictly necessary to own an Android device to develop for Android (see Using Hardware Acceleration for details), but it is a common and simple way to start testing with minimal effort. This section will go through the steps required to use an Android device as a development aid.
If you don’t already have a device, it is easy to acquire a cheap used handset; check Craigslist ...
Get Android Developer Tools Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.