Android Apps for Absolute Beginners.pdf

(58622 KB) Pobierz
I n
id
o
dr
An
s
de
clu
L(
0)
5.
Get started with building your very own Android apps
for
Absolute Beginners
THIRD EDITION
Wallace Jackson
Android Apps
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Author �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xxi
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xxiii
Acknowledgments �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xxv
Introduction �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xxvii
Chapter 1: Setting Up Your Android App Development System �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½1
Chapter 2: Configuring Your Android App Development System �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½33
Chapter 3: An Introduction to the Android Application Development Platform �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½61
Chapter 4: Introduction to XML: Defining an Android App, Its Design, and Constants �½�½�½�½�½101
Chapter 5: Introduction to Java: Objects, Methods, Classes, and Interfaces �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½131
Chapter 6: Android Screen Design: Writing to the Display Using Activity and View �½�½�½�½�½167
Chapter 7: Making Apps Interactive: Intents, Event Handling, and Menus�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½213
Chapter 8: Android UI Design: Using Advanced ViewGroup Layout Containers �½�½�½�½�½�½�½�½�½�½�½�½�½259
Chapter 9: Android Graphic Design: Making Your UI Designs Visual �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½301
Chapter 10: Android Animation: Making Your UI Designs Move �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½353
Chapter 11: Digital Video: Streaming Video, MediaPlayer, and
MediaController classes �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½399
v
vi
Contents at a Glance
Chapter 12: Digital Audio: Providing Aural Feedback for UI Designs Using
SoundPool �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½447
Chapter 13: Android Service Class and Threads: Background Processing �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½475
Chapter 14: Android Content Providers: Providing Data to Applications �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½505
Chapter 15: Developing for Android Wearable Devices �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½551
Chapter 16: The Future of Android: The 64-Bit Android 5�½0 OS �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½591
Appendix A: Audio Concepts, Terminology, and Codecs �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½651
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½665
Introduction
The Android OS is currently the most popular operating system in the world. The Android OS runs on
everything from smartwatches to HD smartphones to touchscreen tablets to ebook readers to game
consoles to smartglasses to ultra-high definition interactive television sets!
There are even more types of consumer electronics devices—such as those found in automotive,
home appliance, security, robotics, photography, industrial and home automation markets—that are
adopting the open source Android OS as their platform as time goes on. This book will show you
how to develop applications for these new device type verticals as they emerge into the market.
Since there are literally billions of Android consumer electronics devices owned by billions of people
all over the world, it stands to reason that developing great Android applications for all these people
might be an extremely lucrative undertaking, assuming that you have the right concept and design.
This book will help you go a long way toward learning how to develop Android applications that will
run across all types of Android-compatible consumer electronics devices, and across all popular
versions of the Android OS, most recently the 32-bit Android 4 OS and the new 64-bit Android 5 OS.
Developing an Android application that works well across all of these types of consumer electronics
devices requires a very specific work process, which I cover in this book.
I wrote
Android Apps for Absolute Beginners, Third Edition
from scratch, targeting those readers
who are absolute beginners to Android yet are technically savvy, but who are not familiar with
computer programming concepts and techniques.
Since 32-bit Android is currently using Version 4.4.4, this book will be more advanced than
Android
Apps for Absolute Beginners, First Edition,
when Android OS Version 1.5 was released by Google for
smartphones, or
Android Apps for Absolute Beginners, Second Edition,
when Android OS Version
3.0 was released for tablets. Since then, five revisions of the 32-bit Android OS Version 4.x have
been released, including 4.0, 4.1, 4.2, 4.3, and 4.4, targeting all new iTV set and game console
products.
xxvii
Zgłoś jeśli naruszono regulamin