Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications

Book description

Learning Android™ Application Programming will help you master modern Android programming by building a fully functional app from the ground up. Working with the Android 4.3 toolset, you’ll solve real-world problems faced by every Android developer and learn best practices for success with any mobile development project.

 
Ideal for developers who have little or no Android experience but have basic Java experience, this tutorial teaches through carefully structured exercises that address the entire development process. Leading Android developers James Talbot and Justin McLean guide you through building a real biking mobile app that can handle everything from mileage tracking to route planning. Each chapter builds your knowledge, step-by-step, and in the end you will have a complete, working app.


Along the way, you’ll gain hands-on experience with writing code that can run on the widest spectrum of devices while still leveraging Android’s newest features. You’ll also discover proven solutions for the occasionally messy realities of Android development, from inaccurate sensor data to inadequate device battery life–pitfalls that most other Android books ignore.

Learn how to

  • Set up your Android development environment on Windows or Mac operating systems

  • Quickly create a simple, working app that demonstrates basic Android principles

  • Master core building blocks, such as Activities, Intents, Services, and Resources

  • Build a functional user interface, and then make it more intuitive and usable

  • Professionally style your Android app

  • Make your app location-aware

  • Integrate social networking features

  • Build highly efficient threaded apps

  • Integrate database support to read and write data

  • Make your app run faster, while using less memory and power

  • Efficiently test and debug your app

  • Easily internationalize your app for multiple countries and languages

  • Sell your app through Google Play and the Amazon AppStore

  • Get all of this book’s sample code at www.androiddevbook.com/code.html.

    Register your book at informit.com/register to gain access to the Bonus KitKat Chapter.


    Download the free version of this book’s On Your Bike app from Google Play today.

    Table of contents

    1. Contents
    2. 1. An Introduction to Android Development
      1. Understanding the Android Difference
      2. Building Native Applications
      3. Understanding the History of Android
      4. Using the Android User Interface
      5. Understanding Android Applications
      6. Introducing Google Play
      7. Summary
    3. 2. Kicking the Tires: Setting Up Your Development Environment
      1. Installing the Java JDK and JRE on Windows
      2. Installing the Eclipse IDE on Windows
      3. Installing the Android SDK on Windows
      4. Installing and Using Java on a Mac
      5. Summary
    4. 3. Putting On the Training Wheels: Creating Your First Android Application
      1. Creating an Android Application
      2. Running Your Android Project
      3. Working with Lint in an Android Project
      4. Understanding the Android Project Files
      5. Summary
    5. 4. Going for Your First Ride: Creating an Android User Interface
      1. Refactoring Your Code
      2. Implementing Strict Mode
      3. Creating a Simple User Interface
      4. Understanding the Activity Lifecycle
      5. Making an Android Device Vibrate
      6. Saving User Preferences
      7. Summary
    6. 5. Customizing Your Bike: Improving Android Application Usability
      1. Refactoring Your Code
      2. Improving the Setting Activity
      3. Action Bars and Menus
      4. Using Notifications
      5. Creating a Database
      6. Summary
    7. 6. Pimping Your Bike: Styling an Android Application
      1. Refactoring Your Application
      2. Understanding Screen Differences
      3. Making Your Application Resolution Independent
      4. Using Configuration Qualifiers
      5. Using Styles and Themes
      6. Summary
    8. 7. Are We There Yet? Making Your Application Location Aware
      1. Refactoring Your Code
      2. Finding the Device’s Location
      3. Dealing with Inaccurate Location Data
      4. Storing GPS Data
      5. Displaying GPS Data
      6. Summary
    9. 8. Inviting Friends for a Ride: Social Network Integration
      1. Refactoring Your Code
      2. Integrating Photos into an Android Application
      3. Sharing Content with Friends
      4. Summary
    10. 9. Tuning Your Bike: Optimizing Performance, Memory, and Power
      1. Refactoring Your Code
      2. Running Your Application as a Service
      3. Improving Battery Life
      4. Speeding up Databases
      5. Summary
    11. 10. Taking the Training Wheels Off: Testing Your Application
      1. Refactoring Your Code
      2. Testing with JUnit
      3. Testing With Android JUnit Extensions
      4. Testing Services
      5. Monkey Testing
      6. Running Tests Automatically
      7. Testing on a Wide Range of Devices
      8. Summary
    12. 11. Touring France: Optimizing for Different Devices and Countries
      1. Refactoring Your Code
      2. Going International
      3. Accommodating Different Dialects
      4. Handling Different Language Formats
      5. Enabling Backwards Compatibility
      6. Building for Different Screen Sizes
      7. Using Fragments
      8. Summary
    13. 12. Selling Your Bike: Using Google Play and the Amazon AppStore
      1. Using Google Play
      2. Employing Advertising in Your Application
      3. Using the Amazon Appstore
      4. Summary

    Product information

    • Title: Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications
    • Author(s):
    • Release date: December 2013
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780133364972