Book description
Pro Android 5 shows you how to build real-world and fun mobile apps using the Android 5 SDK. This book updates the best-selling Pro Android and covers everything from the fundamentals of building apps for smartphones, tablets, and embedded devices to advanced concepts such as custom components, multi-tasking, sensors/augmented reality, better accessories support and much more.
By reading this definitive tutorial and reference, you'll gain the knowledge and experience to create stunning, cutting-edge Android apps that can make you money, while keeping you agile enough to respond to changes in the future.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Foreword
- Introduction
-
Chapter 1: Hello Android
- Prerequisites for Android Development
- Setting Up Your Eclipse Environment
- Setting Up Your Android Studio Environment
- Learning Android’s Fundamental Components
- Hello World!
- AVDs
- Running on a Real Device
- Exploring the Structure of an Android Application
- Examining the Application Life Cycle
- Simple Debugging
- References
- Summary
-
Chapter 2: Introduction to Android Application Architecture
- Exploring a Simple Android Application
-
Defining UI through Layout Files
- Specifying Comments in Layout Files
- Adding Views and View Groups in Layout Files
- Specifying Control Properties in Layout Files
- Indicating ViewGroup Properties
- Controlling Width and Height of a Control
- Introducing Resources and Backgrounds
- Working with Text Controls in the Layout File
- Working with Autogenerated IDs for Controls
- Implementing Programming Logic
- Updating the AndroidManifest.XML
- Placing the Files in the Android Project
- Testing the Calculator App on a Real Device
-
Android Activity Life Cycle
- void onCreate(Bundle savedInstanceState)
- void onStart()
- void onRestoreInstanceState(Bundle savedInstanceState)
- void onResume()
- void onPause()
- void onStop()
- void onSaveInstanceState(Bundle saveStateBundle)
- void onRestart()
- Object onRetainNonConfigurationInstance()
- void onDestroy()
- General Notes on Activity Callbacks
-
More on Resources
- Directory Structure of Resources
- Reading Resources from Java Code
- Runtime Behavior of Drawable Resources
- Using Arbitrary XML Files as Resources
- Working with Raw Resource Files
- Reading Files from the Assets Directory
- Reading Resources and Assets Without an Activity Reference
- Understanding Resource Directories, Language, and Locale
- More on Intents
-
Roadmap for Learning Android and the Rest of the Book
- Track 1: UI Essentials for Your Android Applications
- Track 2: Saving State
- Track 3: Preparing/Taking Your Application to the Market
- Track 4: Making Your Application Robust
- Track 5: Bringing Finesse to Your Apps
- Track 6: Integrating with Other Devices and the Cloud
- Final Track: Getting a Helping Hand from Expert Android
- As We Leave You Now with the Rest of the Book
- References
- Summary
- Chapter 3: Building Basic User Interfaces and Using Controls
- Chapter 4: Adapters and List Controls
- Chapter 5: Building More Advanced UI Layouts
-
Chapter 6: Working with Menus and Action Bars
- Working with Menus Through XML Files
- Working with Menus in Java Code
- Understanding Expanded Menus
- Working with Icon Menus
- Working with Submenus
- Working with Context Menus
- Incorporating Dynamic Menus
- Exploring Action Bars
- Implementing a Standard Action Bar
- Implementing a Tabbed Action Bar
- Implementing a List-Based Action Bar
- Exploring Action Bar and Search View
- Resources
- Summary
- Chapter 7: Styles and Themes
- Chapter 8: Fragments
- Chapter 9: Responding to Configuration Changes
- Chapter 10: Working with Dialogs
-
Chapter 11: Working with Preferences and Saving State
-
Exploring the Preferences Framework
- Understanding CheckBoxPreference and SwitchPreference
- Accessing a Preference Value in Code
- Understanding ListPreference
- Understanding EditTextPreference
- Understanding MultiSelectListPreference
- Updating AndroidManifest.xml
- Using PreferenceCategory
- Creating Child Preferences with Dependency
- Preferences with Headers
- PreferenceScreens
- Dynamic Preference Summary Text
- Reference
- Summary
-
Exploring the Preferences Framework
- Chapter 12: Using the Compatibility Library for Older Devices
- Chapter 13: Exploring Packages, Processes, Threads, and Handlers
- Chapter 14: Building and Consuming Services
-
Chapter 15: Advanced AsyncTask and Progress Dialogs
-
Essentials of a Simple AsyncTask
- Implementing Your First AsyncTask
- Calling an AsyncTask
- Understanding the onPreExecute() Callback and Progress Dialog
- Understanding the doInBackground() Method
- Triggering onProgressUpdate() through publishProgress()
- Understanding the onPostExecute() Method
- Upgrading to a Deterministic Progress Dialog
- AsyncTask and Thread Pools
- Issues and Solutions for Correctly Showing the Progress of an AsyncTask
- References
- Summary
-
Essentials of a Simple AsyncTask
- Chapter 16: Broadcast Receivers and Long-Running Services
- Chapter 17: Exploring the Alarm Manager
-
Chapter 18: Exploring 2D Animation
- Exploring Frame-by-Frame Animation
- Exploring Layout Animation
- Exploring View Animation
-
Exploring Property Animations: The New Animation API
- Understanding Property Animation
- Planning a Test Bed for Property Animation
- Animating Views with Object Animators
- Achieving Sequential Animation with AnimatorSet
- Setting Animation Relationships with AnimatorSet.Builder
- Using XML to Load Animators
- Using PropertyValuesHolder
- Understanding View Properties Animation
- Understanding Type Evaluators
- Understanding Key Frames
- Understanding Layout Transitions
- Resources
- Summary
- Chapter 19: Exploring Maps and Location-Based Services
- Chapter 20: Understanding the Media Frameworks
- Chapter 21: Home Screen Widgets
- Chapter 22: Touch Screens
- Chapter 23: Implementing Drag and Drop
- Chapter 24: Using Sensors
-
Chapter 25: Exploring Android Persistence and Content Providers
- Saving State Using Shared Preferences
- Saving State Using Internal Files
- Saving State Using External Files
- Saving State Using SQLite
- Saving State Using O/R Mapping Libraries
- Saving State Using Content Providers
- Saving State Using Network Storage
-
Storing Data Directly Using SQLite
- Summarizing Key SQLite Packages and Classes
- Creating an SQLite Database
- Defining a Database Through DDLs
- Migrating a Database
- Inserting Rows
- Updating Rows
- Deleting Rows
- Reading Rows
- Applying Transactions
- Summarizing SQLite
- Doing Transactions Through Dynamic Proxies
- Exploring Databases on the Emulator and Available Devices
- Exploring Content Providers
- Implementing Content Providers
- Exercising the Book Provider
- Resources
- Summary
-
Chapter 26: Understanding Loaders
- Understanding the Architecture of Loaders
- Listing Basic Loader API Classes
- Demonstrating the Loaders
- Step 1: Preparing the Activity to Load Data
- Step 2: Initializing the Loader
- Step 3: Implementing onCreateLoader()
- Step 4: Implementing onLoadFinished()
- Step 5: Implementing onLoaderReset()
- Using Search with Loaders
- Understanding the Order of LoaderManager Callbacks
- Writing Custom Loaders
- Resources
- Summary
-
Chapter 27: Exploring the Contacts API
- Understanding Accounts
- Understanding Contacts
- Working with the Contacts API
- Controlling Aggregation of Contacts
- Understanding Personal Profile
- Role of Sync Adapters
- Using Batch Operations to Optimize ContentProvider Updates
- Reusing the Contact Provider UI
- Using Group Features
- Using Photo Features
- References
- Summary
- Chapter 28: Exploring Security and Permissions
- Chapter 29: Using Google Cloud Messaging with Android
-
Chapter 30: Deploying Your Application: Google Play Store and Beyond
- Becoming a Publisher
-
Preparing Your Application for Sale
- Testing for Different Devices
- Supporting Different Screen Sizes
- Preparing AndroidManifest.xml for Uploading
- Localizing Your Application
- Preparing Your Application Icon
- Directing Users Back to the Play Store
- The Android Licensing Service
- Using ProGuard for Optimization, Fighting Piracy
- Preparing Your .apk File for Uploading
- Uploading Your Application
- User Experience on Google Play Store
- Beyond Google Play Store
- References
- Summary
- Index
Product information
- Title: Pro Android 5, Fifth Edition
- Author(s):
- Release date: June 2015
- Publisher(s): Apress
- ISBN: 9781430246817
You might also like
book
Pro Android 4
Pro Android 4shows you how to build real-world and fun mobile apps using the new Android …
book
Android 5
Java-erfahrene Leser lernen in diesem Buch, professionelle und sichere Apps für Android-Smartphones und -Tablets zu entwickeln.Nach …
book
Beginning Android Wearables
Although wearable devices have existed since the 70s, they have only recently become mainstream. Google Glass …
book
Professional Android 4 Application Development, 3rd Edition
Developers, build mobile Android apps using Android 4 The fast-growing popularity of Android smartphones and tablets …