SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The professional programmer’s Deitel® guide to smartphone and tablet app development using Android 4.3 and 4.4, the Eclipse-based Android Development Tools and the new Android Studio
Billions of apps have been downloaded from Google Play™! This book gives you everything you’ll need to start developing great Android apps quickly and getting them published on Google Play™. The book uses an app-driven approach–each new technology is discussed in the context of seven fully tested Android apps, complete with syntax coloring, code highlighting, code walkthroughs and sample outputs. Apps you’ll develop include:
This book presents leading-edge computing technologies for professional software developers. At the heart of the book is the Deitel “app-driven approach”–concepts are presented in the context of complete working Android apps, rather than using code snippets. The introduction and app test drives at the beginning of each chapter show one or more sample executions. The book’s source code is available at www.deitel.com/books/androidfp2.
The apps in this book were carefully designed to introduce you to key Android features and APIs. You’ll quickly learn everything you need to start building Android apps–beginning with a testdrive of the Doodlz app in Chapter 1, then building your first app in Chapter 2. By the time you reach Chapter 9, you’ll be ready to create your own apps for submission to Google Play and other app marketplaces. You’ll master the Google Play submission process, including uploading your apps, deciding whether to sell your apps or offer them for free, and marketing them using in-app advertising, social media, Internet public relations and more.
Practical, example-rich coverage of:
Visit www.deitel.com
Building an Android Tip Calculator App
Preface xiv
Before You Begin xxiii
Chapter 1: Introduction to Android 1
1.1 Introduction 2
1.2 Android–The World’s Leading Mobile Operating System 3
1.3 Android Features 3
1.4 Android Operating System 7
1.5 Downloading Apps from Google Play 11
1.6 Packages 12
1.7 Android Software Development Kit (SDK) 13
1.8 Object-Oriented Programming: A Quick Refresher 16
1.9 Test-Driving the Doodlz App in an Android Virtual Device (AVD) 19
1.10 Building Great Android Apps 30
1.11 Android Development Resources 32
1.12 Wrap-Up 34
Chapter 2: Welcome App 35
2.1 Introduction 36
2.2 Technologies Overview 37
2.3 Creating an App 38
2.4 Android Developer Tools Window 44
2.5 Building the App’s GUI with the Graphical Layout Editor 48
2.6 Running the Welcome App 56
2.7 Making Your App Accessible 57
2.8 Internationalizing Your App 59
2.9 Wrap-Up 63
Chapter 3: Tip Calculator App 64
3.1 Introduction 65
3.2 Test-Driving the Tip Calculator App 66
3.3 Technologies Overview 67
3.4 Building the App’s GUI 70
3.5 Adding Functionality to the App 79
3.6 AndroidManifest.xml 87
3.7 Wrap-Up 88
Chapter 4: Twitter® Searches App 89
4.1 Introduction 90
4.2 Test-Driving the App 91
4.3 Technologies Overview 97
4.4 Building the App’s GUI 100
4.5 Building the MainActivity Class 109
4.6 AndroidManifest.xml 124
4.7 Wrap-Up 124
Chapter 5: Flag Quiz App 125
5.1 Introduction 126
5.2 Test-Driving the Flag Quiz App 128
5.3 Technologies Overview 132
5.4 Building the GUI and Resource Files 136
5.5 MainActivity Class 147
5.6 QuizFragment Class 153
5.7 SettingsFragment Class 165
5.8 SettingsActivity Class