Android development can be challenging, but through the effective use of Android Developer Tools (ADT), you can make the process easier and improve the quality of your code. This concise guide demonstrates how to build apps with ADT for a device family that features several screen sizes, different hardware capabilities, and a varying number of resources.
With examples in Windows, Linux, and Mac OS X, you’ll learn how to set up an Android development environment and use ADT with the Eclipse IDE. Also, contributor Donn Felker introduces Android Studio, a Google IDE that will eventually replace Eclipse.
Learn how to use Eclipse and ADT together to develop Android code
Create emulators of various sizes and configurations to test your code
Master Eclipse tools, or explore the new Android Studio
Use Logcat, Lint, and other ADT tools to test and debug your code
Simulate real-world events, including location, sensors, and telephony
Create dynamic and efficient UIs, using Graphical Layout tools
Monitor and optimize you application performance using DDMS, HierarchyViewer, and the Android Monitor tool
Use Wizards and shortcuts to generate code and image assets
Compile and package Android code with Ant and Gradle
Chapter 1 Getting Started
Installing the Android Software Development Kit
Developing Without Eclipse
Configuring a Device for Development
Chapter 2 Essential Tools
Android Debug Bridge (ADB)
Chapter 3 Configuring Devices and Emulators
Using a Physical Device for Development
Using an Emulator for Development
Android Virtual Devices
Advanced Emulator Configuration
Chapter 4 Using Devices and Emulators
Using the Emulator
Developer Tools Application
Chapter 5 Developing with Eclipse
Anatomy of the Eclipse Workspace
The Android Key
Quick Outline for XML
Other Essential Eclipse Shortcuts
Chapter 6 Developing with Android Studio
Installing Android Studio
Anatomy of the Android Studio IDE
The New Structure of an Android Project
Creating New Android Components
Layout Designer and Layout Preview
Generating an APK
Interacting with Maven and Gradle
Version Control Integration
Migrating from Eclipse
Android Studio Tips and Tricks
Chapter 7 Testing Your Code
Chapter 8 Simulating Events
Simulating Location and Routes
Simulating Telephony Operations
Changing Networking Parameters
Using a Device with Sensor Emulation
Advanced Sensor Testing
Developer Options Menu
Chapter 9 Build Tools
Compiling Your Code
Packaging an APK for Release
Building from the Command Line Using Ant
Advanced Packaging Steps
Gradle-Based Build Tools
Using the Maven Tools
Chapter 10 Monitoring System Resources
Memory Usage in Android
Dalvik Debug Monitor Server (DDMS)
Memory Analyzer Tool (MAT)
Chapter 11 Working with the User Interface
Android Layout Basic Concepts
Editing XML Files Directly
Working with Graphics
Chapter 12 Using the Graphical Editor
Generating Layouts Using the Graphical Layout Editor
Mike Wolfson is a passionate mobile designer/developer working out of Phoenix, AZ. He has been in the software field for almost 20 years, and with Android since its introduction. Currently, he develops Android applications for the health care field. He has written a variety of successful apps, and is best known for the "Droid Of The Day" App.
Mike has spent his career helping others learn technology. He currently runs the local Google Developer Group, and has been a lifelong supporter of a variety of other group learning activities. He has spoken about Android and mobile development at a variety of conferences and user groups.
When he is not geeking out about phones, he enjoys the outdoors (snowboarding, hiking, scuba diving), collecting PEZ dispensers, and chasing his young (but quick) daughter.
The animal on the cover of Android Developer Tools Essentials is a cassowary (genusCasuarius), a large, flightless bird that is native to the rainforests of New Guinea andAustralia. This genus consists of three species: one is extinct and the rest are living butendangered. It is estimated that only 1,500 cassowaries exist in the entirety of Australia.Like the ostrich and the emu, the cassowary is a ratite, or flightless bird. Although thethree species of cassowary differ slightly in size, the Southern cassowary is the largest,with females reaching heights of six and a half feet. Despite their enormous size, cassowariessubsist mainly on fruits that have fallen from trees and will occasionally eatfungus or insects if necessary. They swallow their food whole, sometimes taking in entirebananas or mangos in one gulp.
All species of cassowary are black with bright blue and red necks and hard outgrowthsof flesh on the tops of their heads called casques. There is much debate about whatpurpose the casques serve, with theories ranging from protection from falling fruit toan amplifier of the birds’ rumbling calls. It is also possible that they allow the bird toforge ahead through dense forest growth, with the casque acting as a battering ram toclear foliage out of the way. The thick feathers that adorn the bird’s body are also thoughtto provide protection from the undergrowth given their unique two-quilled design.
Female cassowaries are much larger than males and are in charge of initiating breedingand courtship. After a female selects a mate, they court for almost a month beforebreeding. The female will create a nest and lay the eggs, then immediately start off tofind another mate. The father then incubates the eggs until they hatch by sitting on themfor fifty days. Baby cassowaries are born with tan and white stripes to help them blendin with the detritus on the rainforest floor. The chicks follow their father around forabout ten months and learn how to forage fruit and insects. Eventually, the father chases the chicks away so that they can start life on their own and he can breed with anotherfemale.
Cassowaries are extremely territorial, so in the wild they are solitary creatures. Generallythey are shy around humans, opting to run away rather than be noticed. However,cassowaries can be very dangerous to people and other animals if provoked. Given therate at which human civilization is encroaching upon cassowary habitats, run-ins withthese giant birds are becoming more and more common. In 2003, 150 attacks involvinghumans were reported, and 75% of these came from instances of people trying to feedthe birds. The cassowary’s best defense is its dagger-like claws, one on each center toe,which can grow to be four inches long. One kick from a cassowary’s powerful legs canslice open all but the toughest hides. Especially in northern Australia, where roads bisectthe rainforests, encounters with cassowaries are on the rise. Although large swaths ofland are now protected, the future of the cassowary is as unclear as that of the rainforest;both must contend with human development and the environmental effects of globalwarming.
The cover image is from the Dover Pictorial Archive. The cover font is Adobe ITCGaramond. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed;and the code font is Dalton Maag’s Ubuntu Mono.