Beginning Android Tablet Application Development

Overview

A full-color, fast-paced introduction to developing tablet applications using Android

The new release of Android 3 brings the full power of Android to tablet computing and this hands-on guide offers an introduction to developing tablet applications using this new Android release. Veteran author Wei-Meng Lee explains how Android 3 is specifically optimized for tablet computing and he details Android's tablet-specific functions. Beginning with the basics, this book moves at a ...

See more details below
Available through our Marketplace sellers and in stores.

Pick Up In Store Near You

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (22) from $1.99   
  • New (13) from $1.99   
  • Used (9) from $1.99   
Close
Sort by
Page 1 of 2
Showing 1 – 9 of 13 (2 pages)
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$1.99
Seller since 2008

Feedback rating:

(1758)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
2011 Paperback New Ships out next day, click expedited for faster shipping.

Ships from: cadiz, KY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(2364)

Condition: New
2011-08-09 Paperback 1 New 1118106733 Ships Within 24 Hours. Tracking Number available for all USA orders. Excellent Customer Service. Upto 15 Days 100% Money Back Gurantee. Try ... Our Fast! ! ! ! Shipping With Tracking Number. Read more Show Less

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$5.95
Seller since 2010

Feedback rating:

(126)

Condition: New
1118106733 New

Ships from: Curtisville, PA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$5.99
Seller since 2008

Feedback rating:

(4418)

Condition: New
1118106733 SHIPS WITHIN 24 HOURS!! (SAME BUSINESS DAY) GREAT BOOK!!

Ships from: BAY SHORE, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$10.92
Seller since 2011

Feedback rating:

(729)

Condition: New
PAPERBACK New 1118106733 SERVING OUR CUSTOMERS WITH BEST PRICES. FROM A COMPANY YOU TRUST, HUGE SELECTION. RELIABLE CUSTOMER SERVICE! ! HASSLE FREE RETURN POLICY, SATISFACTION ... GURANTEED**** Read more Show Less

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$10.92
Seller since 2013

Feedback rating:

(405)

Condition: New
PAPERBACK New 1118106733! ! KNOWLEDGE IS POWER! ! ENJOY OUR BEST PRICES! ! ! Ships Fast. All standard orders delivered within 5 to 12 business days.

Ships from: Southampton, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$10.92
Seller since 2010

Feedback rating:

(691)

Condition: New
PAPERBACK New 1118106733! ! ! ! BEST PRICES WITH A SERVICE YOU CAN RELY! ! !

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$10.92
Seller since 2010

Feedback rating:

(922)

Condition: New
PAPERBACK New 1118106733 Friendly Return Policy. A+++ Customer Service!

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$10.92
Seller since 2014

Feedback rating:

(274)

Condition: New
PAPERBACK New 1118106733 XCITING PRICES JUST FOR YOU. Ships within 24 hours. Best customer service. 100% money back return policy.

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 2
Showing 1 – 9 of 13 (2 pages)
Close
Sort by
Sending request ...

Overview

A full-color, fast-paced introduction to developing tablet applications using Android

The new release of Android 3 brings the full power of Android to tablet computing and this hands-on guide offers an introduction to developing tablet applications using this new Android release. Veteran author Wei-Meng Lee explains how Android 3 is specifically optimized for tablet computing and he details Android's tablet-specific functions. Beginning with the basics, this book moves at a steady pace to provide everything you need to know to begin successfully developing your own Android tablet applications.

  • Serves as a full-color, hands-on introduction to developing tablet applications with the new Android 3
  • Offers a helpful overview of Android 3 programming for tablets
  • Details the components of Android tablet applications
  • Highlights ways to build the Android user interface for tablets, create location-based services, publish Android applications, use Eclipse for Android development, and employ the Android emulator

Beginning Android Tablet Application Development is an ideal starting point for getting started with using Android 3 to develop tablet applications.

Read More Show Less

Product Details

  • ISBN-13: 9781118106730
  • Publisher: Wiley
  • Publication date: 8/9/2011
  • Edition number: 1
  • Pages: 288
  • Product dimensions: 7.30 (w) x 9.10 (h) x 0.60 (d)

Meet the Author

Wei-Meng Lee is a technologist and founder of Developer Learning Solutions (www.learn2develop.net), a technology company that specializes in hands-on training in the latest Microsoft and Apple technologies. He writes extensively for online publications and magazines and is the author of Beginning iOS 4 Application Development, Beginning Android Application Development, and many other technology books and articles.
Read More Show Less

Read an Excerpt

Beginning Android Tablet Application Development


By Wei-Meng Lee

John Wiley & Sons

Copyright © 2011 John Wiley & Sons, Ltd
All right reserved.

ISBN: 978-1-1181-0673-0


Chapter One

Getting Started with Android Programming for Tablets

WHAT YOU WILL LEARN IN THIS CHAPTER

* What is Android?

* Android versions and its feature set

* The Android architecture

* The various Android devices on the market

* The Android Market application store

* How to obtain the tools and SDK for developing Android applications * How to develop your first Android application

Welcome to the world of Android! When I was writing my first book on Android (which was just a couple of months ago), I stated that Android was ranked second in the U.S. smartphone market, second to Research In Motion's (RIM) BlackBerry, and overtaking Apple's iPhone. Shortly after the book went to press, comScore (a global leader in measuring the digital world and the preferred source of digital marketing intelligence) reported that Android has overtaken BlackBerry as the most popular smartphone platform in the U.S.

Indeed. With Google's recent introduction of Android 3.0, code-named Honeycomb, it's a perfect time to start learning about Android programming. In my first book, Beginning Android Application Development (Wrox, 2011), I focused on getting readers started with the building blocks of Android programming, with particular emphasis on developing applications for Android smartphone applications. With the release of Android 3.0, Google's focus in this new SDK is the introduction of several new features designed for wide-screen devices, specifically tablets. This focus was the impetus behind the book you are currently holding. Therefore, it also focuses on the various features that are specific to wide-screen devices, and contains enough information that can get you jumpstarted with Android tablet development quickly. Readers who want more comprehensive coverage on Android development in general should start with my Beginning Android Application Development book first, and then read this book for information on designing for tablets.

In this chapter you will learn what Android is, and what makes it so compelling to both developers and device manufacturers alike. You will also get started with developing your first Android application, and learn how to obtain all the necessary tools and set them up so that you can test your application on an Android 3.0 tablet emulator. By the end of this chapter, you will be equipped with the basic knowledge you need to explore more sophisticated techniques and tricks for developing your next killer Android tablet application.

WHAT IS ANDROID?

Android is a mobile operating system that is based on a modified version of Linux. It was originally developed by a startup of the same name, Android, Inc. In 2005, as part of its strategy to enter the mobile space, Google purchased Android and took over its development work (as well as its development team).

Google wanted Android to be open and free; hence, most of the Android code was released under the open-source Apache License, which means that anyone who wants to use Android can do so by downloading the full Android source code. Moreover, vendors (typically hardware manufacturers) can add their own proprietary extensions to Android and customize Android to differentiate their products from others. This simple development model makes Android very attractive and has thus piqued the interest of many vendors. This has been especially true for companies affected by the phenomenon of Apple's iPhone, a hugely successful product that revolutionized the smartphone industry. Such companies include Motorola and Sony Ericsson, which for many years have been developing their own mobile operating systems. When the iPhone was launched, many of these manufacturers had to scramble to find new ways to revitalize their products. These manufacturers see Android as a solution — they will continue to design their own hardware and use Android as the operating system that powers it.

The main advantage of adopting Android is that it offers a unified approach to application development. Developers need only develop for Android, and their applications should be able to run on numerous different devices, as long as the devices are powered using Android. In the world of smartphones, applications are the most important part of the success chain. Device manufacturers therefore see Android as their best hope to challenge the onslaught of the iPhone, which already commands a large base of applications.

Android Versions

Android has gone through quite a number of updates since its first release. Table 1-1 shows the various versions of Android and their codenames.

In February 2011, Google released Android 3.0, a tablet-only release supporting wide-screen devices. The key changes in Android 3.0 are as follows:

* New user interface optimized for tablets

* 3D desktop with new widgets

* Refined multi-tasking

* New web browser features, such as tabbed browsing, form auto-fill, bookmark syncing, and private browsing

* Support for multicore processors

Applications written for versions of Android prior to 3.0 are compatible with Android 3.0 devices, and they run without modifications. Android 3.0 tablet applications that make use of the newer features available in 3.0, on the other hand, will not be able to run on older devices. If you want to ensure that an Android tablet application is able to run on all versions of devices, you must programmatically ensure that you only make use of features that are supported in specific versions of Android. To do so, you can make use of the android.os.Build.VERSION.SDK constant. The following code snippet shows how you can determine the version of the device during runtime:

int version = Integer.parseInt(android.os.Build.VERSION.SDK); switch (version) { case 8: //-use features specific to Android 2.2- break; case 9: //-use features specific to Android 2.3.1- break; case 10: //-use features specific to Android 2.3.3- break; case 11: //-use features specific to Android 3.0- break; }

Android Devices in the Market

Android devices come in all shapes and sizes. As of late May 2010, the Android OS powers all of the following types of devices:

* Smartphones

* Tablets

* E-reader devices

* Netbooks

* MP4 players

* Internet TVs

Increasingly, manufacturers are rushing out to release Android tablets. Tablet sizes typically start at seven inches, measured diagonally. Figure 1-1 shows the Samsung Galaxy Tab (top), a seven-inch tablet, and the Dell Streak (bottom), a five-inch tablet.

While the Samsung Galaxy Tab and the Dell Streak run the older Android 2.x, the newer tablets run the latest Android 3.0 Honeycomb. Figure 1-2 shows the Motorola Xoom.

Besides the Motorola Xoom, the LG Optimus Pad, shown in Figure 1-3, is another Android 3.0 device, running the latest Android Honeycomb OS.

The Android Market

As mentioned earlier, one of the main factors determining the success of a smartphone platform is the applications that support it. It is clear from the success of the iPhone that applications play a very vital role in determining whether a new platform swims or sinks. In addition, making these applications accessible to the general user is extremely important.

As such, in August 2008, Google announced the Android Market, an online application store for Android devices, and made it available to users in October 2008. Using the Market application that is preinstalled on their Android device, users can simply download third-party applications directly onto their devices. Both paid and free applications are supported on the Android Market, though paid applications are available only to users in certain countries due to legal issues.

Similarly, in some countries, users can buy paid applications from the Android Market, but developers cannot sell in that country. As an example, at the time of writing, users in India can buy apps from the Android Market, but developers in India cannot sell apps on the Android Market. The reverse may also be true; for example, users in South Korea cannot buy apps on the Android Market, but developers in South Korea can sell apps on it.

OBTAINING THE REQUIRED TOOLS

Naturally, you are anxious to get your hands dirty and start writing some applications! Before you write your first tablet application, however, you need to download the required tools and SDKs.

For Android development, you can use a Mac, a Windows PC, or a Linux machine. All the tools needed are free and can be downloaded from the Web. All the examples provided in this book will work fine with the Android emulator.

NOTE This book uses a Windows 7 computer to demonstrate all the code samples. If you are using a Mac or a Linux computer, the screenshots should look similar; minor differences may be present, but you should be able to follow along without problems.

So, let the fun begin!

Java JDK

The Android SDK makes use of the Java SE Development Kit (JDK). Hence, if your computer does not have the JDK installed, you should start off by downloading the JDK from www.oracle.com/ technetwork/java/javase/downloads/index.html and installing it prior to moving to the next section.

Eclipse

The first step toward developing any applications is obtaining the integrated development environment (IDE). In the case of Android, the recommended IDE is Eclipse, a multi-language software development environment featuring an extensible plug-in system. It can be used to develop various types of applications, using languages such as Java, Ada, C, C++, COBOL, Python, and others.

For Android development, you should download the Eclipse IDE for Java EE Developers (www .eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr1). Six editions are available: Windows (32 and 64-bit), Mac OS X (Cocoa 32 and 64), and Linux (32 and 64-bit). Simply select the relevant one for your operating system. All the examples in this book were tested using the 32-bit version of Eclipse for Windows.

Once the Eclipse IDE is downloaded, unzip its contents (the eclipse folder) into a folder, say C:\Android\.

Downloading the Android SDK

The next important piece of software you need to download is, of course, the Android SDK. The Android SDK contains a debugger, libraries, an emulator, documentation, sample code, and tutorials.

You can download the Android SDK from http://developer.android.com/sdk/index.html (see Figure 1-4).

For Windows users, there are two ways in which you can download the Android SDK — either you download the entire Android SDK package — android-sdk_ r10-windows.zip or you can download the SDK installer — installer_ r10-windows.zip. For beginning Android developers, I strongly encourage you to download the latter, as it makes it very easy for you to get started.

Once the installer_r10-windows.zip package is downloaded, double-click on it to start the installation process. It will first detect whether the JDK is installed and will only continue if it finds one installed on your computer. Next, you will be asked to choose a destination folder for installing the SDK (see Figure 1-5). Remember the path to this folder because you need to use it later.

Click Next to continue.

You will next be asked to choose a Start Menu folder to install the Android SDK shortcut. Use the default Android SDK Tools folder and click Install. When the installation is complete, click Finish (see Figure 1-6). Doing so will start the SDK Manager, which downloads all the necessary packages for you to test your Android applications.

Installing the Packages

When the SDK Manager is started, it first checks for the packages that are available for installation. The packages contain the documentation and SDK specific to each version of the Android OS. They also contain sample code and tools for the various platforms.

Figure 1-7 shows the various SDK packages that you can install on your computer. Double-click on each package name to select or deselect a package. If you are not sure which packages to install, you might want to select the Accept All radio button to download and install all the packages.

Click Install to proceed with the downloading and installation of the various selected packages.

Each version of the Android OS is identified by an API level number. For example, Android 3.0 is level 11 (API 11), while Android 2.3.3 is level 10 (API 10), and so on. For each level, two platforms are available. For example, level 11 offers the following:

* SDK Platform Android 3.0 * Google APIs by Google Inc., Android API 11, revision 1

The key difference between the two is that the Google APIs platform contains the Google Maps library. Therefore, if the application you are writing requires Google Maps, you need to create an AVD using the Google APIs platform.

Downloading and installing the packages takes some time, so you have to be patient. When all the packages are installed, click Close. You should now see a listing of all the packages installed (see Figure 1-8).

Creating Android Virtual Devices (AVDs)

Once the packages are downloaded and installed, the next step is to create an Android Virtual Device (AVD) to be used for testing your Android applications. An AVD is an emulator instance that enables you to model an actual device. Each AVD consists of a hardware profile, a mapping to a system image, as well as emulated storage, such as a secure digital (SD) card.

You can create as many AVDs as you want in order to test your applications with several different configurations. This testing is important to confirm that your application behaves as expected when it is run on different devices with varying capabilities.

NOTE Appendix B discusses some of the capabilities of the Android emulator.

To create an AVD, select the Virtual Devices item in the left pane of the Android SDK and AVD Manager window (see Figure 1-9).

Then click the New ... button located in the right pane of the window. In the Create new Android Virtual Device (AVD) window, enter the items as shown in Figure 1-10. Click the Create AVD button when you are done.

In this case, you have created an AVD (put simply, an Android emulator) that emulates an Android device running version 3.0 of the OS. In addition to what you have created, you also have the option to emulate the device with an SD card and different screen densities and resolutions.

NOTE Appendix B explains how to emulate the different types of Android devices.

It is preferable to create a few AVDs with different API levels so that your application can be tested on different devices. To emulate the Motorola Xoom, you should choose the "Google APIs (Google Inc.) - API Level 11" target.

To see what the Android emulator looks like, select the AVD you have just created and click the Start ... button. Figure 1-11 shows the Android 3.0 emulator.

Click and move the lock icon to touch a circle that appears when you move the mouse. This unlocks the emulator. Figure 1-12 shows the main window of the Android 3.0 screen.

Clicking the Apps icon on the top-right corner of the screen reveals a list of installed applications on the device (see Figure 1-13).

Android Development Tools (ADT)

With the Android SDK and AVD set up, it is now time to configure Eclipse to recognize the Android project template. The Android Development Tools (ADT) plug-in for Eclipse is an extension to the Eclipse IDE that supports the creation and debugging of Android applications. Using the ADT, you will be able to do the following in Eclipse:

* Create new Android application projects * Access the tools for accessing your Android emulators and devices * Compile and debug Android applications * Export Android applications into Android Packages (APKs) * Create digital certificates for code-signing your APK

To install the ADT, first launch Eclipse by double-clicking the eclipse.exe file located in the eclipse folder.

(Continues...)



Excerpted from Beginning Android Tablet Application Development by Wei-Meng Lee Copyright © 2011 by John Wiley & Sons, Ltd. Excerpted by permission of John Wiley & Sons. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

INTRODUCTION xiii

PART I: QUICK TOUR OF ANDROID 3 FOR TABLETS.

CHAPTER 1: GETTING STARTED WITH ANDROID PROGRAMMING FOR TABLETS 3

CHAPTER 2: COMPONENTS OF AN ANDROID TABLET APPLICATION 29

CHAPTER 3: ANDROID USER INTERFACE 65

PART II: PROJECTS.

CHAPTER 4: CREATING LOCATION-BASED SERVICES APPLICATIONS 109

CHAPTER 5: SMS MESSAGING AND NETWORKING 151

CHAPTER 6: PUBLISHING ANDROID APPLICATIONS 205

PART III: APPENDICES.

APPENDIX A: USING ECLIPSE FOR ANDROID DEVELOPMENT 229

APPENDIX B: USING THE ANDROID EMULATOR 243

APPENDIX C: ANSWERS TO EXERCISES 259

INDEX 263

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)