
Professional Android
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
and capabilities
Professional Android, 4th Edition shows developers how to
leverage the latest features of Android to create robust and
compelling mobile apps. This hands-on approach provides in-depth
coverage through a series of projects, each introducing a new
Android platform feature and highlighting the techniques and best
practices that exploit its utmost functionality. The exercises
begin simply, and gradually build into advanced Android
development. Clear, concise examples show you how to quickly
construct real-world mobile applications.
This book is your guide to smart, efficient, effective Android
development.
* Learn the best practices that get more out of Android
* Understand the anatomy, lifecycle, and UI metaphor of Android
apps
* Design for all mobile platforms, including tablets
* Utilize both the Android framework and Google Play
services
More details
Other editions
Additional editions

Content
- Cover
- Title Page
- Copyright
- About the Authors
- About the Technical Editors
- Credits
- Acknowledgments
- Contents
- Introduction
- Who This Book is for
- What This Book Covers
- How This Book is Structured
- What you Need to Use This Book
- Conventions
- Source Code
- Errata
- Chapter 1 Hello, Android
- Android Application Development
- A Little Background
- The Not-So-Distant Past
- Living in the Future
- The Android Ecosystem
- Pre-installed Android Applications
- Android SDK Features
- What Does Android Run On?
- Why Develop for Mobile?
- Why Develop for Android?
- Introducing the Development Framework
- What Comes in the Box
- Understanding the Android Software Stack
- The Android Run Time
- Android Application Architecture
- Android Libraries
- Chapter 2 Getting Started
- Getting Started Developing Android Apps
- Developing for Android
- What You Need to Begin
- Creating Your First Android Application
- Getting Started Writing Android Apps Using Kotlin
- Using the Android Support Library Package
- Developing for Mobile and Embedded Devices
- Hardware-Imposed Design Considerations
- Considering the User's Environment
- Developing for Android
- Android Development Tools
- Android Studio
- The Android Virtual Device Manager
- The Android Emulator
- Android Profiler
- The Android Debug Bridge
- APK Analyzer
- The Lint Tool
- Monkey, Monkey Runner, and Espresso UI Testing
- Gradle
- Chapter 3 Applications and Activities and Fragments, Oh My!
- Applications, Activities, and Fragments
- The Components of an Android Application
- The Android Application Life Cycle, Priority, and Process States
- Introducing the Android Application Class
- A Closer Look at Android Activities
- Creating Activities
- Using the AppCompatActivity
- The Activity Life Cycle
- Responding to Memory Pressure
- Introducing Fragments
- Creating New Fragments
- The Fragment Life Cycle
- Introducing the Fragment Manager
- Adding Fragments to Activities
- Communicating Between Fragments and Activities
- Fragments Without User Interfaces
- Building an Earthquake Viewer Application
- Chapter 4 Defining the Android Manifest and Gradle Build Files, and Externalizing Resources
- The Manifest, Build Files, and Resources
- Introducing the Android Manifest
- Configuring the Gradle Build
- Gradle Settings File
- Project Gradle Build File
- Module Gradle Build Files
- Externalizing Resources
- Creating Resources
- Using Resources
- Creating Resources for Different Languages and Hardware
- Runtime Configuration Changes
- Chapter 5 Building User Interfaces
- Fundamental Android Design
- Density-Independent Design
- Android User Interface Fundamentals
- Assigning User Interfaces to Activities
- Introducing Layouts
- Defining Layouts
- Using Layouts to Create Device-Independent User Interfaces
- Optimizing Layouts
- The Android Widget Toolbox
- Working with Lists and Grids
- Recycler View and Layout Managers
- Introducing Adapters
- Returning to the Earthquake Viewer Application
- Introducing Data Binding
- Enabling Data Binding
- Variables in Data Binding
- Data Binding for the Earthquake Viewer Application
- Creating New Views
- Modifying Existing Views
- Creating Compound Controls
- Creating Simple Compound Controls as a Layout
- Creating Custom Views
- Using Custom Controls
- Chapter 6 Intents and Broadcast Receivers
- Using Intents and Broadcast Receivers
- Using Intents to Launch Activities
- Explicitly Starting New Activities
- Implicit Intents and Late Runtime Binding
- Determining If an Intent Will Resolve
- Returning Results from Activities
- Using Platform-Native Actions to Launch Activities
- Creating Intent Filters to Receive Implicit Intents
- Defining an Intent Filter
- Using Intent Filters for Plug-Ins and Extensibility
- Introducing Linkify
- Native Linkify Link Types
- Creating Custom Link Strings
- Using the Match Filter
- Using the Transform Filter
- Using Intents to Broadcast Events
- Broadcasting Events with Intents
- Listening for Intent Broadcasts with Broadcast Receivers
- Registering Broadcast Receivers in Code
- Registering Broadcast Receivers in Your Application Manifest
- Managing Manifest Receivers at Run Time
- Monitoring Device State Changes Through Broadcast Intents
- Introducing the Local Broadcast Manager
- Introducing Pending Intents
- Chapter 7 Using Internet Resources
- Connecting to the Internet
- Connecting, Downloading, and Parsing Internet Resources
- Why Build a Native Internet App?
- Connecting to an Internet Resource
- Performing Network Operations on Background Threads Using View Models, Live Data, and Asynchronous Tasks
- Parsing XML Using the XML Pull Parser
- Connecting the Earthquake Viewer to the Internet
- Parsing JSON Using the JSON Parser
- Using the Download Manager
- Downloading Files
- Customizing Download Manager Notifications
- Specifying a Download Location
- Canceling and Removing Downloads
- Querying the Download Manager
- Best Practices for Downloading Data Without Draining the Battery
- An Introduction to Internet Services and Cloud Computing
- Chapter 8 Files, Saving State, and User Preferences
- Saving Files, States, and Preferences
- Saving and Restoring Activity and Fragment Instance State Using the Lifecycle Handlers
- Retaining Instance State with Headless Fragments and View Models
- View Models and Live Data
- Headless Fragments
- Creating and Saving Shared Preferences
- Retrieving Shared Preferences
- Introducing On Shared Preference Change Listeners
- Configuring Auto Backup of Application Files and Shared Preferences
- Building a Preference UI
- Using the Preference Support Library
- Defining a Preference Screen Layout in XML
- Introducing the Preference Fragment
- Creating a Settings Activity for the Earthquake Monitor
- Including Static Files as Resources
- Working with the Filesystem
- File-Management Tools
- Creating Files on Application-Specific Internal Storage
- Creating Files on Application-Specific External Storage
- Accessing Public Directories Using Scoped Directory Access
- Sharing Files Using File Provider
- Creating a File Provider
- Sharing a File Using a File Provider
- Receiving a File from a File Provider
- Accessing Files from Other Applications Using the Storage Access Framework
- Requesting Temporary Access to Files
- Requesting Persistent Access to Files
- Requesting Access to Directories
- Creating New Files
- Using URI-Based Permissions
- Chapter 9 Creating and Using Databases
- Introducing Structured Data Storage in Android
- Storing Data Using the Room Persistence Library
- Adding the Room Persistence Library
- Defining a Room Database
- Persisting Complex Objects Using Type Convertors
- Defining Room Database Interactions Using Data Access Objects
- Performing Room Database Interactions
- Monitoring Query Result Changes with Live Data
- Persisting Earthquakes to a Database with Room
- Working with SQLite Databases
- Input Validation and SQL Injection
- Cursors and Content Values
- Defining a Database Contract
- Introducing the SQLiteOpenHelper
- Opening Databases with the SQLite Open Helper
- Opening and Creating Databases Without the SQLite Open Helper
- Adding, Updating, and Deleting Rows
- Querying a Database
- Extracting Values from a Cursor
- Introducing the Firebase Realtime Database
- Adding Firebase to Your App
- Defining a Firebase Database and Defining Access Rules
- Adding, Modifying, Deleting, and Querying Data From a Firebase Realtime Database
- Chapter 10 Content Providers and Search
- Introducing Content Providers
- Why Should I Use Content Providers?
- Creating Content Providers
- Creating the Content Provider's Database
- Registering Content Providers
- Publishing Your Content Provider's URI Address
- Implementing Content Provider Queries
- Content Provider Transactions
- Sharing Files Using a Content Provider
- Adding Permission Requirements to Content Providers
- Accessing Content Providers with Content Resolvers
- Querying Content Providers
- Cancelling Queries
- Querying for Content Asynchronously with a Cursor Loader
- Adding, Deleting, and Updating Content
- Accessing Files Stored in Content Providers
- Accessing Permission-Restricted Content Providers
- Using Native Android Content Providers
- Accessing the Call Log
- Using the Media Store Content Provider
- Using the Contacts Content Provider
- Using the Calendar Content Provider
- Adding Search to Your Application
- Defining Your Search Metadata
- Creating a Search Results Activity
- Searching a Content Provider
- Using the Search View Widget
- Providing Search Suggestions Using a Content Provider
- Searching the Earthquake Monitor Database
- Chapter 11 Working in the Background
- Working in the Background
- Using Background Threads
- Using Asynchronous Tasks to Run Tasks Asynchronously
- Manual Thread Creation Using Handler Threads
- Scheduling Background Jobs
- Creating a Job Service for the Job Scheduler
- Scheduling Jobs with the Job Scheduler
- Scheduling Jobs with the Firebase Job Dispatcher
- Scheduling Work with the Work Manager
- An Earthquake-Monitoring Job Service Example
- Using Notifications to Notify Users
- Introducing the Notification Manager
- Working with Notification Channels
- Creating Notifications
- Setting a Notification's Priority
- Adding Notification Actions
- Adding Direct Reply Actions
- Grouping Multiple Notifications
- Adding Notifications to the Earthquake Monitor
- Using Firebase Cloud Messaging
- Triggering Notifications Remotely with Firebase Notifications
- Receiving Data with Firebase Cloud Messaging
- Using Alarms
- Creating, Setting, and Canceling Alarms
- Setting an Alarm Clock
- Introducing Services
- Using Bound Services
- Creating a Started Service
- Chapter 12 Implementing the Android Design Philosophy
- Introducing the Android Design Philosophy
- Designing for Every Screen
- Resolution Independence
- Supporting and Optimizing for Different Screen Sizes
- Creating Scalable Graphics Assets
- Introducing Material Design
- Thinking in Terms of Paper and Ink
- Using Color and Keylines as Guides
- Continuity Through Motion
- Material Design UI Elements
- The App Bar
- Applying Material Design to the Earthquake Monitor
- Using Cards to Display Content
- Floating Action Buttons
- Chapter 13 Implementing a Modern Android User Experience
- The Modern Android UI
- Creating Consistent, Modern User Interfaces Using AppCompat
- Creating and Applying Themes Using AppCompat
- Creating Theme Overlays for Specific Views
- Adding a Menu and Actions to the App Bar
- Defining a Menu Resource
- Adding a Menu to an Activity
- Adding a Menu to a Fragment
- Updating Menu Items Dynamically
- Handling Menu Selections
- Adding Action Views and Action Providers
- Going Beyond the Default App Bar
- Replacing Your App Bar with a Toolbar
- Advanced Scrolling Techniques for the Toolbar
- Incorporating Menus Without the App Bar
- Improving the Earthquake Monitor's App Bar
- App Navigation Patterns
- Navigating with Tabs
- Implementing a Bottom Navigation Bar
- Using a Navigation Drawer
- Combining Navigation Patterns
- Adding Tabs to the Earthquake Monitor
- Choosing the Right Level of Interruption
- Initiating a Dialog
- Let's Make a Toast
- Inline Interruptions with Snackbars
- Chapter 14 Advanced Customization of Your User Interface
- Expanding the User Experience
- Supporting Accessibility
- Supporting Navigation Without a Touch Screen
- Providing a Textual Description of Each View
- Introducing Android Text-to-Speech
- Using Speech Recognition
- Using Speech Recognition for Voice Input
- Using Speech Recognition for Search
- Controlling Device Vibration
- Going Full Screen
- Working with Property Animations
- Enhancing Your Views
- Advanced Canvas Drawing
- Creating Interactive Controls
- Composite Drawable Resources
- Transformative Drawables
- Layer Drawables
- State List Drawables
- Level List Drawables
- Copy, Paste, and the Clipboard
- Copying Data to the Clipboard
- Pasting Clipboard Data
- Chapter 15 Location, Contextual Awareness, and Mapping
- Adding Location, Maps, and Contextual Awareness to Your Applications
- Introducing Google Play Services
- Adding Google Play Services to Your Application
- Determining the Availability of Google Play Services
- Finding Device Location Using Google Location Services
- Using the Emulator to Test Location-Based Functionality
- Finding the Last Known Location
- "Where Am I" Example
- Requesting Location Change Updates
- Changing Device Location Settings
- Updating the Location in the "Where Am I" Example
- Best Practices When Using Location
- Setting and Managing Geofences
- Using the Legacy Platform Location-Based Services
- Selecting a Location Provider
- Finding the Last Known Location
- Requesting Location Change Updates
- Best Practice for Using the Legacy Location-Based Services
- Using the Geocoder
- Reverse Geocoding
- Forward Geocoding
- Geocoding Where Am I
- Creating Map-Based Activities
- Getting Your Maps API Key
- Creating a Map-Based Activity
- Configuring Google Maps
- Changing the Camera Position with Camera Updates
- Mapping Where Am I
- Displaying the Current Location with the My Location Layer
- Displaying Interactive Map Markers
- Adding Shapes to Google Maps
- Adding Image Overlays to Google Maps
- Adding Markers and Shapes to Where Am I
- Mapping the Earthquake Example
- Adding Contextual Awareness
- Connecting to the Google Play Services API Client and Obtaining API Keys
- Using Awareness Snapshots
- Setting and Monitoring Awareness Fences
- Awareness Best Practices
- Chapter 16 Hardware Sensors
- Introducing Android Sensors
- Using the Sensor Manager
- Understanding the Android Sensors
- Discovering and Identifying Sensors
- Determining Sensor Capabilities
- Wakeup and Non-Wakeup Sensors
- Monitoring Sensor Results
- Interpreting Sensor Values
- Testing Sensors with the Android Virtual Device and Emulator
- Best Practices for Working with Sensors
- Monitoring a Device's Movement and Orientation
- Determining the Natural Orientation of a Device
- Introducing Accelerometers
- Detecting Acceleration Changes
- Creating a Gravitational Force Meter
- Determining a Device's Orientation
- Creating a Compass and Artificial Horizon
- Using the Environmental Sensors
- Using the Barometer Sensor
- Creating a Weather Station
- Using Body Sensors
- User Activity Recognition
- Chapter 17 Audio, Video, and Using the Camera
- Playing Audio and Video, and Using the Camera
- Playing Audio and Video
- Introducing the Media Player
- Using Media Player for Video Playback
- Using ExoPlayer for Video Playback
- Requesting and Managing Audio Focus
- Pausing Playback When the Output Changes
- Responding to the Volume Controls
- Working with a Media Session
- Using the Media Router and Cast Application Framework
- Background Audio Playback
- Building an Audio Playback Service
- Using a Media Browser to Connect Your Activity to a Media Browser Service
- Life Cycle of a Media Browser Service
- Playing Audio as a Foreground Service
- Creating Media Style Notifications
- Using the Media Recorder to Record Audio
- Using the Camera for Taking Pictures
- Using Intents to Take Pictures
- Controlling the Camera Directly
- Reading and Writing JPEG EXIF Image Details
- Recording Video
- Using Intents to Record Video
- Using the Media Recorder to Record Video
- Adding Media to the Media Store
- Inserting Media Using the Media Scanner
- Inserting Media Manually
- Chapter 18 Communicating with Bluetooth, NFC, and Wi-Fi Peer-to-Peer
- Networking and Peer-to-Peer Communication
- Transferring Data Using Bluetooth
- Managing the Local Bluetooth Device Adapter
- Being Discoverable and Remote Device Discovery
- Bluetooth Communications
- Bluetooth Profiles
- Bluetooth Low Energy
- Transferring Data Using Wi-Fi Peer-to-Peer
- Initializing the Wi-Fi Peer-to-Peer Framework
- Discovering Peers
- Connecting with Peers
- Transferring Data Between Peers
- Using Near Field Communication
- Reading NFC Tags
- Using the Foreground Dispatch System
- Using Android Beam
- Creating Android Beam Messages
- Assigning the Android Beam Payload
- Receiving Android Beam Messages
- Chapter 19 Invading the Home Screen
- Customizing the Home Screen
- Introducing Home Screen Widgets
- Defining the Widget Layout
- Defining Your Widget Size and Other Metadata
- Implementing Your Widget
- Updating the Widget UI Using the App Widget Manager and Remote Views
- Forcing Refreshes of Your Widget Data and UI
- Creating and Using a Widget Configuration Activity
- Creating an Earthquake Widget
- Introducing Collection View Widgets
- Creating Collection View Widget Layouts
- Updating Collection View Items with a Remote Views Factory
- Updating Collection View Items with a Remote Views Service
- Populating Collection View Widgets Using a Remote Views Service
- Adding Interactivity to the Items Within a Collection View Widget
- Refreshing Your Collection View Widgets
- Creating an Earthquake Collection View Widget
- Creating Live Wallpaper
- Creating a Live Wallpaper Definition Resource
- Creating a Wallpaper Service Engine
- Creating a Wallpaper Service
- Creating App Shortcuts
- Static Shortcuts
- Dynamic Shortcuts
- Tracking App Shortcut Use
- Chapter 20 Advanced Android Development
- Advanced Android
- Paranoid Android
- Linux Kernel Security
- Re-introducing Permissions
- Storing Keys in the Android Keystore
- Using the Fingerprint Sensor
- Dealing with Different Hardware and Software Availability
- Specifying Required Hardware
- Confirming Hardware Availability
- Building Backward-Compatible Applications
- Optimizing UI Performance with Strict Mode
- Telephony and SMS
- Telephony
- Sending and Receiving SMS Messages
- Chapter 21 Releasing, Distributing, and Monitoring Applications
- Preparing for Release
- Preparing Release Support Material
- Preparing Your Code for a Release Build
- Updating Application Metadata in Your Application Manifest
- Reviewing Application Installation Restrictions
- Application Versioning
- Signing Production Builds of Your Application
- Creating a Keystore and Signing Key with Android Studio
- Obtaining API Keys Based on Your Private Release Key
- Building and Signing a Production Release
- Distributing Your Application on the Google Play Store
- Introducing the Google Play Store
- Getting Started with the Google Play Store
- Creating an Application on the Google Play Store
- Publishing Your Application
- Monitoring Your Application in Production
- An Introduction to Monetizing Applications
- Application Marketing, Promotion, and Distribution Strategies
- Application Launch Strategies
- Internationalization
- Using Firebase to Monitor Your Application
- Adding Firebase to Your Application
- Using Firebase Analytics
- Firebase Performance Monitoring
- Index
- EULA
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.