You are previewing Android™ Application Development in 24 Hours, Sams Teach Yourself, Third Edition.
O'Reilly logo
Android™ Application Development in 24 Hours, Sams Teach Yourself, Third Edition

Book Description

In just 24 sessions of one hour or less, learn how to build powerful apps for the world’s most popular mobile platform: Android 4.3. Using this book’s straightforward, step-by-step approach, you’ll build complete Android 4.3 apps from the ground up as you master the skills you need to design, develop, test, and publish powerful solutions. Extensively updated for Android’s newest features and tools, every lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!

Highlights of this new Third Edition include:

  • Extensive new coverage: fragments, action bar, SQLite, content providers, Facebook SDK, and more

  • Practical guidance on developing for multiple Android versions

  • How to use open source projects to simplify Android development

  • New topic-focused structure with at least one complete project in nearly every chapter

  • Register your book at informit.com/register to gain access to the Bonus KitKat chapter online.

    Learn how to…

  • Quickly set up your development environment and create Android projects

  • Use Android layouts and fragments  to create apps that look great on phones, tablets, and even TVs

  • Develop intuitive user interfaces using Android controls

  • Access the cloud and retrieve data using the Flickr API

  • Create a full-blown app that parses JSON, stores metadata, and
    displays Flickr images

  • Use a SQLite database and content providers to create responsive, data-driven apps

  • Write social apps using the Facebook Android SDK

  • Use contact and calendar data

  • Build location-based apps using LocationManager APIs or the new Google Play Location Services

  • Internationalize your apps

  • Work with media and cameras

  • Use open-source libraries to add “finishing touches”

  • Package and publish apps to Google Play and other app stores

  • Table of Contents

    1. About This eBook
    2. Title Page
    3. Copyright Page
    4. Praise for Sams Teach Yourself Android™ Application Development in 24 Hours, Third Edition
    5. Contents at a Glance
    6. Table of Contents
    7. Preface
      1. New in the Third Edition
      2. Who This Book Is For
      3. How This Book Is Organized
    8. About the Authors
    9. Dedication
    10. Acknowledgments
    11. We Want to Hear from You!
    12. Reader Services
    13. Part I: Getting Started
      1. Hour 1. Getting Started: Creating a Simple App
        1. Setting Up Your Development Environment
        2. Instantly Creating a Simple App
        3. Understanding the Java Code and XML Layout
        4. Running the App
        5. Personalizing the App
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercise
      2. Hour 2. Understanding an Android Activity
        1. Understanding an Activity
        2. Starting an Activity
        3. Passing Information Between Activities
        4. Understanding Intents
        5. Understanding the Activity Lifecycle
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercises
      3. Hour 3. Exploring an Android Project and Resources
        1. Exploring the Android Project Files
        2. Understanding Common Resources
        3. Summary
        4. Q&A
        5. Workshop
        6. Exercises
      4. Hour 4. Not Just Smartphones: Supporting Tablets, TVs, and More
        1. A Brief History of Android
        2. Handling Device Display and Orientation
        3. Device Features
        4. Platform Versions and the Compatibility Package
        5. Launching Apps on a Device
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercises
    14. Part II: User Interface
      1. Hour 5. Using Layouts
        1. Getting Started with Layouts
        2. More Layout Basics with LinearLayout
        3. Laying Out Child Views
        4. FrameLayout
        5. RelativeLayout
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercises
      2. Hour 6. Working with Basic UI Controls
        1. Setting Up the Demo App
        2. Using Input Controls
        3. Using Controls with Adapters
        4. ProgressBars and SeekBars
        5. ImageViews
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercise
      3. Hour 7. ActionBar and Menu Navigation
        1. Understanding the Options Menu
        2. Using the Action Bar
        3. Strategies for Using the ActionBar and Menus
        4. Summary
        5. Q&A
        6. Workshop
        7. Exercises
      4. Hour 8. Activities and Fragments
        1. Using Fragments Across UIs
        2. Creating and Displaying Fragments
        3. Using Fragments for Navigation
        4. Fragment and Activity Interaction
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercises
      5. Hour 9. Alert! Working with Dialogs
        1. Understanding a Dialog Fragment
        2. Dialogs for Picking Date and Time
        3. Using Alert Dialogs
        4. Summary
        5. Q&A
        6. Workshop
        7. Exercise
      6. Hour 10. Lists, Grids, Galleries, and Flippers
        1. ListFragments
        2. Grids and Galleries
        3. Using an AdapterViewFlipper
        4. Options for Paging Controls
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercise
      7. Hour 11. App Setting: Managing Preferences
        1. Using SharedPreferences
        2. Setting User Preferences
        3. Summary
        4. Q&A
        5. Workshop
        6. Exercise
    15. Part III: Data Access and Use
      1. Hour 12. Accessing the Cloud: Working with a Remote API
        1. Fetching Remote Data
        2. Using and Parsing JSON-Formatted Data
        3. Putting the Pieces Together
        4. Checking Connectivity
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercise
      2. Hour 13. Using SQLite and File Storage
        1. Organizing a Database with Tables
        2. Managing Data with SQLiteOpenHelper
        3. Adding, Updating, and Deleting Data
        4. Querying Data and Using Cursors
        5. Using a Database in the App
        6. Saving an Image File
        7. Summary
        8. Q&A
        9. Workshop
        10. Exercises
      3. Hour 14. Creating a Content Provider
        1. Using a URI for Data Retrieval
        2. Building a Content Provider
        3. Using FlickrPhotoProvider in the App
        4. Requesting a File from a Content Provider
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercises
      4. Hour 15. Loaders, CursorLoaders, and CustomAdapters
        1. How Loaders Work
        2. Loader Classes
        3. Understanding Loader States
        4. Creating Custom Adapters
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercise
      5. Hour 16. Developing a Complete App
        1. Determining App Functionality
        2. Developing the App
        3. Summary
        4. Q&A
        5. Workshop
        6. Exercise
    16. Part IV: Special Topics
      1. Hour 17. Contacts and Calendar: Accessing Device Data
        1. All About the Calendar
        2. Understanding Contacts
        3. Summary
        4. Q&A
        5. Workshop
        6. Exercise
      2. Hour 18. Where Are We? Working with Location-Based Services
        1. Determining Location
        2. Using Geocoding Services
        3. Using the Geo Intent
        4. Additional Location Features
        5. Using Google Play Services
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercise
      3. Hour 19. Bonjour, World! Localizing Your Apps
        1. General Internationalization Principles
        2. Working with Localization with Android
        3. Handling Locales with Android
        4. Using Applications to Handle Locales
        5. Android Internationalization Strategies
        6. Using Localization Utilities
        7. Summary
        8. Q&A
        9. Workshop
        10. Exercises
      4. Hour 20. Say Cheese! Working with Cameras
        1. Capturing Media
        2. Using Intents to Take Photos and Videos
        3. Developing a Camera App
        4. Summary
        5. Q&A
        6. Workshop
        7. Exercise
      5. Hour 21. Media Basics: Images, Audio, and Video
        1. Examining the ImageView Control
        2. Bitmaps and Canvas
        3. Using VideoViews
        4. Playing Audio with MediaPlayer
        5. Exploring More Media Options
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercise
      6. Hour 22. Using the Facebook SDK
        1. About Facebook
        2. Setting Up for Facebook Development
        3. Using the Facebook SDK in a Project
        4. Developing a Facebook Photo Upload App
        5. Facebook SDK Features
        6. Creating Libraries for Your Own Projects
        7. Summary
        8. Q&A
        9. Workshop
        10. Exercise
    17. Part V: Wrapping Up
      1. Hour 23. Pro Tips, Finishing Touches, and Next Steps
        1. Responsive Apps: Using IntentService
        2. Adding Animation
        3. Using Open Source
        4. Digging Deeper into Android
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercise
      2. Hour 24. Publishing Your Apps
        1. Preparing for Release
        2. Publishing Your App
        3. Monetizing Your App
        4. Summary
        5. Q&A
        6. Workshop
        7. Exercise
    18. Index