You are previewing Android Quick APIs Reference.
O'Reilly logo
Android Quick APIs Reference

Book Description

This condensed code and APIs reference to the new Google Android 5.0 SDK presents the essential Android APIs in a well-organized format that can be used as a handy reference. You will find a concise reference to the Android SDK and its APIs using the official Android Studio IDE.

The Android Quick APIs Reference is small and handy and ideal for taking with you to your appointments with your clients. You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a software development kit and APIs reference that is concise, to the point and highly accessible. The book is packed with useful information and is a must-have for any mobile or Android app developer or programmer.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Preface
  10. Chapter 1: Android Platform
    1. Platform Architecture
      1. Linux Kernel
      2. Native Libraries
      3. Android Runtimes
      4. Application Framework
      5. Applications
    2. Android Versions
      1. Platform Version
      2. Platform Codename
      3. API Level
      4. Android Platform Fragmentation
      5. Android Support Library
    3. Summary
  11. Chapter 2: Development Environment
    1. Android Toolchain
      1. Android Software Development Kit
      2. Android Native Development Kit
      3. Android Development Tools for Eclipse
      4. Android Studio
    2. Setting Up the Development Environment
      1. Microsoft Windows
      2. Apple Mac OS X
      3. Ubuntu Linux
    3. Hello Android Application
      1. Creating a New Android Application Project
      2. Building the Android Application
      3. Running the Android Application
    4. Summary
  12. Chapter 3: Application Components
    1. Activity
      1. Creating an Activity
      2. Declaring an Activity
      3. Activity Life Cycle
    2. Intent
      1. Intent Resolution
      2. Intent Filters
      3. Getting and Extracting the Intent
      4. Pending Intent
    3. Service
      1. Creating a Service
      2. Declaring a Service
      3. Restricting Access to a Service
      4. Service Life Cycle
      5. Service Restart Strategy
      6. Starting a Service
      7. Starting a Service with an Intent
      8. Binding to a Service
      9. System Services
    4. Content Provider
      1. Creating a Content Provider
      2. Content Provider Contract
      3. Declaring a Content Provider
      4. Content Provider Security
      5. Accessing a Content Provider
      6. System Content Providers
    5. Broadcast Messages
      1. Sending a Broadcast Message
      2. Receiving the Broadcast Message
      3. Broadcast Receiver Life Cycle
      4. Broadcast Receiver Security
    6. Context
    7. Application
    8. Summary
  13. Chapter 4: Application Resources
    1. Structure of Resources
    2. Resource Groups
      1. Property Animation Resources
      2. Tween Animation Resources
      3. Color State List Resources
      4. Drawable Resources
      5. Layout Resources
      6. Menu Resources
      7. Raw Resources
      8. Value Resources
      9. XML Resources
    3. Default and Alternative Resources
      1. Defining Alternative Resources
      2. Supported Configuration Qualifiers
    4. Handling Runtime Changes
    5. Assets
      1. Using Assets in Web View
    6. APK Expansion Files
    7. Summary
  14. Chapter 5: Layouts and Views
    1. Layouts
      1. Declaring Layouts
      2. Layout Requirements
      3. Common Layouts
      4. Dynamic Layouts
      5. Loading the XML Layout Resource
      6. Accessing Individual Views in a Layout
    2. Views
      1. Output Controls
      2. Input Controls
    3. Fragments
      1. Creating a Fragment
      2. Adding a Fragment to an Activity
      3. Replacing a Fragment
      4. Adding a User Interface to a Fragment
      5. Passing Arguments to a Fragment
      6. Communication Between the Activity and the Fragment
    4. Summary
  15. Chapter 6: User Interface
    1. Action Bar
      1. Adding the Action Bar
      2. Removing the Action Bar
      3. Adding Actions to the Action Bar
      4. Action Views
      5. Action Providers
    2. Toasts
    3. Dialogs
      1. Dialog Flavors
      2. Showing a Dialog
    4. Notifications
      1. Accessing the Notification Service
      2. Posting a Notification
      3. Adding Actions to a Notification
      4. Adding Action Buttons to a Notification
      5. Updating a Notification
      6. Canceling a Notification
    5. Summary
  16. Chapter 7: Storing Data
    1. Simple Files
      1. Using Internal Storage
      2. Using External Storage
      3. Caching Data Using Storage
      4. Structuring Data Through JSON
    2. Shared Preferences
      1. Opening Shared Preferences
      2. Adding and Editing Shared Preferences
      3. Reading the Shared Preferences
      4. Listening for Shared Preferences Changes
      5. Preferences Screen
    3. SQLite Relational Database
      1. Creating and Opening the Database
      2. Creating Tables
      3. Upgrading the Existing Database
      4. Writing to the Database
      5. Reading from the Database
      6. Deleting Data from the Database
      7. Deleting the Entire Database
    4. Android Backup Service
      1. Signing Up for Android Backup Service
      2. Adding the Backup Service Key to the Manifest
      3. Providing the Backup Agent Implementation
      4. Declaring the Backup Agent in the Manifest
      5. Requesting Backup
      6. Testing the Backup Agent Implementation
    5. Summary
  17. Chapter 8: Sensors and Location
    1. Sensor
      1. Sensor Manager
      2. Receiving Sensor Events
      3. Interpreting Sensor Events
    2. Location
      1. Location Permissions
      2. Location Manager
      3. Location Providers
      4. Location Updates
    3. Summary
  18. Chapter 9: Media and Camera
    1. Audio Manager
      1. Audio Devices
      2. Audio Streams
    2. Playing Audio
      1. MediaPlayer
      2. AsyncPlayer
      3. SoundPool
    3. Recording Audio
      1. Requesting Audio Record Permission
      2. Configuring the Audio Source for Recording
      3. Configuring the Audio Output for Recording
      4. Starting the Audio Recording
      5. Stopping the Audio Recording
      6. Releasing the MediaRecorder
    4. Playing Video
      1. Creating a Surface for Video Playback
      2. Starting Video Playback
      3. Stopping Video Playback
    5. Video Recording
      1. Creating a Preview Surface for Video Recording
      2. Configuring the Video Source for Video Recording
      3. Configuring the Video Encoder for Video Recording
    6. Camera
      1. Requesting the Camera Access Permission
      2. CameraManager
      3. Opening the Camera
      4. Capturing from the Camera
    7. Summary
  19. Index