Read more
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 Android's basic building blocks to create user interfaces, store data, connect to the network, and more.
Throughout the book, you'll build a Twitter-like application, adding new features with each chapter. You'll 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 Android's 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
List 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;
About the author
Marko is the director of Twitter University, where he manages the training of Twitter Engineers in Android and other open source technologies. Previously he was cofounder of Marakana (acquired by Twitter), a firm that trained thousands of Android developers at Intel, Cisco, Qualcomm, Motorola, the Department of Defense, and other institutions. Marko is also the creator of Android Bootcamp course and cofounder of San Francisco Android Users' Group.
Masumi Nakamura, VP of Engineering at Placester, Inc, has spent over 15years in software doing everything from mobile development, scalinglarge backend systems, to running a Data Science team over at Paypal,inc. He also spends a lot of his time advising and working closely witha variety of startup companies.