Synopses & Reviews
Want to build apps for Android devices? This book is the perfect way to master the fundamentals. Written by experts who have taught this mobile platform to hundreds of developers in large organizations and startups alike, this gentle introduction shows experienced object-oriented programmers how to use Androids basic building blocks to create user interfaces, store data, connect to the network, and more.
Throughout the book, youll build a Twitter-like application, adding new features with each chapter. Youll also create your own toolbox of code patterns to help you program any type of Android application with ease.
- Become familiar with the Android platform and how it fits into the mobile ecosystem
- Dive into the Android stack, including its application framework and the APK application package
- Learn Androids building blocks: Activities, Intents, Services, Content Providers, and Broadcast Receivers
- Create basic Android user interfaces and organize UI elements in Views and Layouts
- Build a service that uses a background process to update data in your application
About the Author
Marko Gargenta is the founder and chief Android expert at Marakana, a training company in San Francisco. Marko has developed Android Bootcamp and Android Internals courses, and has trained over 1,000 developers on four continents. His clients include Qualcomm, Sony-Ericsson, Motorola, Sharp, Cisco, U.S. Department of Defense, and many more. Marko frequently speaks on Android at technical conferences and events, and is the founder of San Francisco Android Users Group.
With over a decade of software engineering experience, Masumi Nakamura has worked in various positions within the mobile technology arena, from building out mobile infrastructure to founding his own mobile company. He was one of the primary Android developers of the Where Android app and now is Principal Architect for the Big Data and Recommendations Group at Where, Inc. Outside of coding, he spends his time practicing Ba Gua Zhang and caring for his two cats.
Table of Contents
Preface; What's Inside; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Android Overview; 1.1 Android Overview; 1.2 History; 1.3 Android Versions; 1.4 Android Flavors; 1.5 Summary; Chapter 2: Java Review; 2.1 Comments; 2.2 Data Types: Primitives and Objects; 2.3 Modifiers; 2.4 Arrays; 2.5 Operators; 2.6 Control Flow Statements; 2.7 Error/Exception Handling; 2.8 Complex Example; 2.9 Interfaces and Inheritance; 2.10 Collections; 2.11 Generics; 2.12 Threads; 2.13 Summary; Chapter 3: The Stack; 3.1 Stack Overview; 3.2 Linux; 3.3 Native Layer; 3.4 Dalvik; 3.5 Application Framework; 3.6 Applications; 3.7 Summary; Chapter 4: Installing and Beginning Use of Android Tools; 4.1 Installing Java Development Kit; 4.2 Installing the Android SDK; 4.3 Hello World!; 4.4 Anatomy of an Android Project; 4.5 Drawable Resources; 4.6 Building the Project; 4.7 Android Emulator; 4.8 Summary; Chapter 5: Main Building Blocks; 5.1 A Real-World Example; 5.2 Activities; 5.3 Intents; 5.4 Services; 5.5 Content Providers; 5.6 Broadcast Receivers; 5.7 Application Context; 5.8 Summary; Chapter 6: Yamba Project Overview; 6.1 The Yamba Application; 6.2 Design Philosophy; 6.3 Project Design; 6.4 Part 1: Android User Interface; 6.5 Part 2: Intents, ActionBar, and More; 6.6 Part 3: Android Services; 6.7 Part 4: Content Providers; 6.8 Part 5: Lists and Adapters; 6.9 Part 6: Broadcast Receivers; 6.10 Part 7: App Widgets; 6.11 Part 8: Networking and the Web (HTTP); 6.12 Part 9: Live Wallpaper and Handlers; 6.13 Summary; Chapter 7: Android User Interface; 7.1 Two Ways to Create a User Interface; 7.2 Views and Layouts; 7.3 Starting the Yamba Project; 7.4 The StatusActivity Layout; 7.5 The StatusActivity Java Class; 7.6 Logging Messages in Android; 7.7 Threading in Android; 7.8 Other UI Events; 7.9 Alternative Resources; 7.10 Summary; Chapter 8: Fragments; 8.1 Fragment Example; 8.2 Fragment Life Cyle; 8.3 Dynamically Adding Fragments; 8.4 Summary; Chapter 9: Intents, Action Bar, and More; 9.1 Preferences; 9.2 The Action Bar; 9.3 Shared Preferences and Updating Status Fragment; 9.4 The Filesystem Explained; 9.5 Summary; Chapter 10: Services; 10.1 Our Example Service: RefreshService; 10.2 Pulling Data from Yamba; 10.3 Summary; Chapter 11: Content Providers; 11.1 Databases on Android; 11.2 Status Contract Class; 11.3 Update RefreshService; 11.4 Content Providers; 11.5 Creating a Content Provider; 11.6 Summary; Chapter 12: Lists and Adapters; 12.1 MainActivity; 12.2 Basic MainActivity; 12.3 Timeline Fragment; 12.4 About Adapters; 12.5 Loading the Data; 12.6 Custom Logic via ViewBinder; 12.7 Details View; 12.8 Summary; Chapter 13: Broadcast Receivers; 13.1 About Broadcast Receivers; 13.2 BootReceiver; 13.3 Alarms and System Services; 13.4 Broadcasting Intents; 13.5 Summary; Chapter 14: App Widgets; 14.1 Using Content Providers Through Widgets; 14.2 Summary; Chapter 15: Networking and Web Overview; 15.1 Quick Example; 15.2 Networking Basics; 15.3 HTTP API; 15.4 Apache HTTP Client; 15.5 HttpUrlConnection; 15.6 Networking in the Background using AsyncTask and AsyncTaskLoader; 15.7 Summary; Chapter 16: Interaction and Animation: Live Wallpaper and Handlers; 16.1 Live Wallpaper; 16.2 Handler; 16.3 Summary; Index; Colophon;