Book description
The Deitels' App-Driven, Live Code Approach is simply the best way to master Android programming! The Deitels teach Android programming through sixteen complete, working Android Apps. Each chapter presents new concepts through a single App. The authors first discuss what the App does, show screen shots, test drive the App, and present an overview of the technologies and architecture used to build it. Next, the authors walk through building the App, presenting complete code and providing a detailed "Live Code" walkthrough. As part of the code walkthrough, they discuss essential programming concepts, and demonstrate the functionality of relevant Android 2.x APIs. Readers will gain hands-on experience with a wide spectrum of essential Android APIs. The book also has an extensive introduction to programming using the Java language, making this book appropriate for Java courses that want to add an app-programming flavor.
Table of contents
- Title Page
- Copyright Page
- Deitel® Series Page
- Dedication
- Trademarks
- Contents
-
Preface
- Android How to Program
- Intended Audiences
- App-Development Courses
- Android Marketplace: Competition, Innovation, Explosive Growth and Opportunities
- App-Driven Approach
- Staying in Contact with the Authors
- Copyright Notice and Code License
- Getting up to Speed in Java and XML
- Key Features
- Pedagogic Features
- Software Used in Android How to Program
- Instructor Resources
- Before You Begin
- The Deitel Online Android and Java Resource Centers
- CourseSmart Web Books
- Acknowledgments
- About the Authors
- Corporate Training from Deitel & Associates, Inc.
-
Before You Begin
- Font and Naming Conventions
- Software and Hardware System Requirements
- Installing the Java Development Kit (JDK)
- Installing the Eclipse IDE
- Installing the Android SDK
- Installing the ADT Plugin for Eclipse
- Installing the Android Platform(s)
- Creating Android Virtual Devices (AVDs) for Use in the Android Emulator
- (Optional) Setting Up an Android Device for Development
- (Optional) Other IDEs for Developing Android Apps
- Obtaining the Code Examples
-
1. Introduction to Android
- 1.1. Introduction
- 1.2. Android Overview
- 1.3. Android 2.2 (Froyo)
- 1.4. Android 2.3 (Gingerbread)
- 1.5. Android 3.0 (Honeycomb)
- 1.6. Android 4.0 (Ice Cream Sandwich)
- 1.7. Downloading Apps from the Android Market
- 1.8. Packages
- 1.9. Android Software Development Kit (SDK)
- 1.10. Object Technology: A Quick Refresher
- 1.11. Test-Driving the Doodlz App in an Android Virtual Device (AVD)
- 1.12. Deitel Resources
- 1.13. Android Development Resources
- 1.14. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
2. Android Market and App Business Issues
- 2.1. Introduction
- 2.2. Building Great Android Apps
- 2.3. Android Best Practices
- 2.4. Registering at Android Market
- 2.5. Setting Up a Google Checkout Merchant Account
- 2.6. AndroidManifest.xml File
- 2.7. Preparing Your Apps for Publication
- 2.8. Uploading Your Apps to Android Market
- 2.9. Other Android App Marketplaces
- 2.10. Pricing Your App: Free or Fee
- 2.11. Monetizing Apps with In-App Advertising
- 2.12. Monetizing Apps: Using In-App Billing to Sell Virtual Goods in Your Apps
- 2.13. Launching the Market App from Within Your App
- 2.14. Managing Your Apps in Android Market
- 2.15. Marketing Your App
- 2.16. Other Popular App Platforms
- 2.17. Android Developer Documentation
- 2.18. Android Humor
- 2.19. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
3. Welcome App
- 3.1. Introduction
- 3.2. Technologies Overview
- 3.3. Eclipse IDE
- 3.4. Creating a New Project
- 3.5. Building the Welcome App’s GUI with the ADT’s Visual Layout Editor
- 3.6. Examining the main.xml File
- 3.7. Running the Welcome App
- 3.8. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
- 4. Tip Calculator App
- 5. Favorite Twitter® Searches App
- 6. Flag Quiz Game App
- 7. Cannon Game App
- 8. SpotOn Game App
- 9. Doodlz App
- 10. Address Book App
- 11. Route Tracker App
- 12. Slideshow App
- 13. Enhanced Slideshow App
- 14. Weather Viewer App
-
A. Introduction to Java Applications
- A.1. Introduction
- A.2. Your First Program in Java: Printing a Line of Text
- A.3. Modifying Your First Java Program
- A.4. Displaying Text with printf
- A.5. Another Application: Adding Integers
- A.6. Memory Concepts
- A.7. Arithmetic
- A.8. Decision Making: Equality and Relational Operators
- A.9. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
B. Introduction to Classes, Objects, Methods and Strings
- B.1. Introduction
- B.2. Declaring a Class with a Method and Instantiating an Object of a Class
- B.3. Declaring a Method with a Parameter
- B.4. Instance Variables, set Methods and get Methods
- B.5. Primitive Types vs. Reference Types
- B.6. Initializing Objects with Constructors
- B.7. Floating-Point Numbers and Type double
- B.8. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
C. Control Statements
- C.1. Introduction
- C.2. Algorithms
- C.3. Pseudocode
- C.4. Control Structures
- C.5. if Single-Selection Statement
- C.6. if...else Double-Selection Statement
- C.7. while Repetition Statement
- C.8. Case Study: Counter-Controlled Repetition
- C.9. Case Study: Sentinel-Controlled Repetition
- C.10. Case Study: Nested Control Statements
- C.11. Compound Assignment Operators
- C.12. Increment and Decrement Operators
- C.13. Primitive Types
- C.14. Essentials of Counter-Controlled Repetition
- C.15. for Repetition Statement
- C.16. Examples Using the for Statement
- C.17. do...while Repetition Statement
- C.18. switch Multiple-Selection Statement
- C.19. break and continue Statements
- C.20. Logical Operators
- C.21. Wrap-Up
- Self-Review Exercises (Sections C.1–C.13)
- Self-Review Exercises (Sections C.14–C.20)
- Answers to Self-Review Exercises (Sections C.1–C.13)
- Answers to Self-Review Exercises (Sections C.14–C.20)
- Exercises (Sections C.1–C.13)
- Exercises (Sections C.14–C.20)
-
D. Methods: A Deeper Look
- D.1. Introduction
- D.2. Program Modules in Java
- D.3. static Methods, static Fields and Class Math
- D.4. Declaring Methods with Multiple Parameters
- D.5. Notes on Declaring and Using Methods
- D.6. Method-Call Stack and Activation Records
- D.7. Argument Promotion and Casting
- D.8. Java API Packages
- D.9. Introduction to Random-Number Generation
- D.10. Case Study: A Game of Chance; Introducing Enumerations
- D.11. Scope of Declarations
- D.12. Method Overloading
- D.13. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
E. Arrays and ArrayLists
- E.1. Introduction
- E.2. Arrays
- E.3. Declaring and Creating Arrays
- E.4. Examples Using Arrays
- E.5. Case Study: Card Shuffling and Dealing Simulation
- E.6. Enhanced for Statement
- E.7. Passing Arrays to Methods
- E.8. Case Study: Class GradeBook Using an Array to Store Grades
- E.9. Multidimensional Arrays
- E.10. Case Study: Class GradeBook Using a Two-Dimensional Array
- E.11. Class Arrays
- E.12. Introduction to Collections and Class ArrayList
- E.13. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
F. Classes and Objects: A Deeper Look
- F.1. Introduction
- F.2. Time Class Case Study
- F.3. Controlling Access to Members
- F.4. Referring to the Current Object’s Members with the this Reference
- F.5. Time Class Case Study: Overloaded Constructors
- F.6. Default and No-Argument Constructors
- F.7. Composition
- F.8. Enumerations
- F.9. Garbage Collection
- F.10. static Class Members
- F.11. final Instance Variables
- F.12. Packages
- F.13. Package Access
- F.14. Wrap-Up
- Self-Review Exercise
- Answers to Self-Review Exercise
- Exercises
-
G. Object-Oriented Programming: Inheritance and Polymorphism
- G.1. Introduction to Inheritance
- G.2. Superclasses and Subclasses
- G.3. protected Members
- G.4. Relationship between Superclasses and Subclasses
- G.5. Class Object
- G.6. Introduction to Polymorphism
- G.7. Polymorphism: An Example
- G.8. Demonstrating Polymorphic Behavior
- G.9. Abstract Classes and Methods
- G.10. Case Study: Payroll System Using Polymorphism
- G.11. final Methods and Classes
- G.12. Case Study: Creating and Using Interfaces
- G.13. Common Interfaces of the Java API
- G.14. Wrap-Up
- Self-Review Exercises (Sections G.1–G.5)
- Self-Review Exercises (Sections G.6–G.13)
- Answers to Self-Review Exercises (Sections G.1–G.5)
- Answers to Self-Review Exercises (Sections G.6–G.13)
- Exercises (Sections G.1–G.5)
- Exercises (Sections G.6–G.13)
-
H. Exception Handling: A Deeper Look
- H.1. Introduction
- H.2. Example: Divide by Zero without Exception Handling
- H.3. Example: Handling ArithmeticExceptions and InputMismatchExceptions
- H.4. When to Use Exception Handling
- H.5. Java Exception Hierarchy
- H.6. finally Block
- H.7. Stack Unwinding and Obtaining Information from an Exception Object
- H.8. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
I. GUI Components and Event Handling
- I.1. Introduction
- I.2. Nimbus Look-and-Feel
- I.3. Text Fields and an Introduction to Event Handling with Nested Classes
- I.4. Common GUI Event Types and Listener Interfaces
- I.5. How Event Handling Works
- I.6. JButton
- I.7. JComboBox; Using an Anonymous Inner Class for Event Handling
- I.8. Adapter Classes
- I.9. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Exercises
-
J. Other Topics
- J.1. Introduction
- J.2. Collections Overview
- J.3. Type-Wrapper Classes for Primitive Types
- J.4. Interface Collection and Class Collections
- J.5. Lists
- J.6. Collections Methods
- J.7. Interface Queue
- J.8. Sets
- J.9. Maps
- J.10. Introduction to Files and Streams
- J.11. Class File
- J.12. Introduction to Object Serialization
- J.13. Introduction to Multithreading
- J.14. Creating and Executing Threads with the Executor Framework
- J.15. Overview of Thread Synchronization
- J.16. Concurrent Collections Overview
- J.17. Multithreading with GUI
- J.18. Wrap-Up
- Self-Review Exercises
- Answers to Self-Review Exercises
- Execises
- K. Operator Precedence Chart
- L. Primitive Types
- Index
Product information
- Title: Android How to Program
- Author(s):
- Release date: February 2012
- Publisher(s): Pearson
- ISBN: 9780133077698
You might also like
book
Programming iOS 13
If you’re grounded in the basics of Swift, Xcode, and the Cocoa framework, this book provides …
video
Android 6 App Development Fundamentals I and II
Overview Android App Development Fundamentals 3/e uses Paul Deitel’s unique "app-driven" approach to get you up …
book
iOS 8 for Programmers: An App-Driven Approach with Swift, 3rd Edition
The professional programmer’s Deitel® guide to iPhone® and iPad® app development using iOS® 8, Swift™, Xcode® …
book
Xcode Treasures
Learn the critical tips and techniques to make using Xcode for the iPhone, iPad, or Mac …