You are previewing Android 6 Essentials.
O'Reilly logo
Android 6 Essentials

Book Description

Design, build, and create your own applications using the full range of features available in Android 6

About This Book

  • Learn how to utilize the robust features of Android 6 to design, develop, and publish better Android applications

  • Get useful guidance on creating new apps or migrating existing apps to support features such as app permissions, app links, fingerprint authentication, etc

  • A fast paced guide, packed with hands-on examples that ties all the features such as API, audio, video, camera, tab customization together under a single cover

  • Who This Book Is For

    This book is for Android developers who are looking to move their applications into the next Android version with ease.

    What You Will Learn

  • Familiarize yourself with the features of Android 6

  • Code with the new Android permissions model

  • Use apps auto backup and restore lost data automatically

  • Increase user engagement with apps through an assistant using triggers and providing contextual assistance

  • Assess and handle proper usage of the API

  • Work with Audio,Video,Camera in Android 6

  • Utilize the new features in Android for professional purposes

  • Understand and code Chrome’s custom tabs

  • In Detail

    Android 6 is the latest and greatest version of the Android operating system, and comes packed with cutting edge new features for you to harness for the benefit of building better applications.

    This step-by-step guide will take you through the basics of the Android Marshmallow permissions model and beyond into other crucial areas such as the Audio,Video,Camera API and Android’s at work features. Learn how to create, deploy, and manage Android applications with Marshmallow’s API and the latest functionalities.

    The combination of instructions and real-world examples will make your application deployment and testing a breeze.

    Style and approach

    This easy-to-follow, step-by-step tutorial provides explanations and examples to add the new Android 6 features to your skill set. Each chapter provides sequential steps and detailed information about the API, as well as best practices and testing options.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Android 6 Essentials
      1. Table of Contents
      2. Android 6 Essentials
      3. Credits
      4. About the Author
      5. Acknowledgments
      6. About the Reviewer
      7. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
            1. Downloading the color images of this book
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Android Marshmallow Permissions
        1. An overview of Android permissions
          1. Permissions
          2. Permission group definitions
          3. Permissions that imply feature requirements
          4. Viewing the permissions for each app
        2. Understanding Android Marshmallow permissions
          1. An overview
          2. Permission groups
          3. Runtime permissions
        3. Taking coding permissions into account
          1. Testing permissions
          2. Coding for runtime permissions
          3. Best practices and usage notes
            1. Minimalism is a great option
            2. Asking for too many permissions at once
            3. Honesty can be a great policy
        4. Need support handling runtime permissions?
          1. Some permissions are normal and safer to use
        5. Summary
      10. 2. App Links
        1. The Android Intent system
          1. Creating a website association
            1. Why this file?
          2. Triggering app link verification
          3. App link settings and management
        2. Testing app links
          1. Checking manifest and listing domains
          2. The Digital Asset Links API
          3. Testing our intent
          4. Checking policies using adb
        3. Summary
      11. 3. Apps' Auto Backup
        1. An overview
        2. Data backup configuration
          1. Including or excluding data
          2. The backup configuration syntax
          3. Opting out from app data backup
        3. Backup configuration testing
          1. Setting backup logs
          2. Testing the backup phase
          3. Testing the restore phase
          4. Troubleshooting
        4. Important bytes
          1. What to exclude from the backup
          2. BackupAgent and backup events
        5. Summary
      12. 4. Changes Unfold
        1. Power-saving modes
          1. The Doze mode
            1. What happens to apps when a device is dozing?
            2. Testing apps with Doze mode
          2. The App Standby mode
            1. What happens to apps when in the App Standby mode?
            2. Testing apps with the App Standby mode
            3. Excluded apps and settings
            4. Tips
        2. Removable storage adoption
        3. Apache HTTP client removal
        4. Notifications
        5. Text selection
          1. Support library notice
        6. Android Keystore changes
        7. Wi-Fi and networking changes
        8. Runtime
        9. Hardware identifier
        10. APK validation
        11. USB connection
        12. Direct Share
          1. What if we have nothing to share?
          2. Direct Share best practices
        13. Voice interactions
        14. The Assist API
        15. Bluetooth API Changes
          1. Bluetooth stylus support
          2. Improved Bluetooth low energy scanning
        16. Summary
      13. 5. Audio, Video, and Camera Features
        1. Audio features
          1. Support for the MIDI protocol
            1. MidiManager
          2. Digital audio capture and playback
          3. Audio and input devices
          4. Information on audio devices
          5. Changes in AudioManager
        2. Video features
          1. android.media.MediaSync
          2. MediaCodecInfo.CodecCapabilities.getMaxSupportedInstances
          3. Why do we need to know this?
          4. MediaPlayer.setPlaybackParams
        3. Camera features
          1. The flashlight API
          2. The reprocessing API
            1. android.media.ImageWriter
            2. android.media.ImageReader
          3. Changes in the camera service
        4. Summary
      14. 6. Android for Work
        1. Behavioral changes
          1. The work profile contacts display option
          2. Wi-Fi configuration options
          3. The Wi-Fi configuration lock
          4. Work Policy Controller addition
          5. DevicePolicyManager changes
        2. Single-use device improvements
        3. Silently installing/uninstalling apps
        4. Improved certificate access
        5. Automatic system updates
        6. Third-party certificate installation
        7. Data usage statistics
        8. Managing runtime permissions
        9. VPN access and display
        10. Work profile status
        11. Summary
      15. 7. Chrome Custom Tabs
        1. What is a Chrome custom tab?
          1. What is WebView?
          2. Customization options
        2. When to use Chrome custom tabs
        3. The implementation guide
          1. Can we use Chrome custom tabs?
          2. Custom UI and tab interaction
            1. The custom action button
            2. Configuring a custom menu
            3. Configuring custom enter and exit animations
            4. Chrome warm-up
            5. Connecting to the Chrome service
            6. Warming up the browser process
            7. Creating a new tab session
            8. Setting the prefetching URL
            9. Custom tabs connection callback
        4. Summary
      16. 8. Authentication
        1. The Fingerprint authentication API
          1. How do we use fingerprint authentication?
          2. Setting up for testing
        2. Credentials' Grace Period
        3. Cleartext network traffic
          1. So, what do we do with the cleartext network traffic flag?
        4. Summary
      17. Index