Mobile TV Elite Software

Posts Tagged ‘Android 2’

One bug of the Android 2.x book: Professional Android 2 Application Development

The chap2 in the Android 2.x book “Professional Android 2 Application Development” gives a “TO-DO LIST EXAMPLE”, which will create a new to-do list Android application from scratch. There are 9 steps to create the to-do list application with using native Android View controls and the bug occurs on the final step:

“The final step to make this to-do list functional is to let users add new to-do items. Add an onKeyListener to the EditText that listens for a ‘‘D-pad center button’’ click before adding the contents of the EditText to the to-do list array and notifying the ArrayAdapter of the change. Then clear the EditText to prepare for another item.”

The added codes are bold:

myEditText.setOnKeyListener(new OnKeyListener() {
 public boolean onKey(View v, int keyCode, KeyEvent event) {
  if (event.getAction() == KeyEvent.ACTION_DOWN)
   if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER){
    todoItems.add(0, myEditText.getText().toString());
    return true;

If you can’t run this to-do list application as the Android project, maybe the bug occurred on the below line:

myEditText.setOnKeyListener(new OnKeyListener() {

You should modify this line to:

myEditText.setOnKeyListener(new View.OnKeyListener() {

then the problem maybe resolved.

5 comments - What do you think?  Posted by CuteAndroid - March 22, 2010 at 12:00 pm

Categories: Android, Android book   Tags: , , ,

Android 2.x books for developers

As an open source mobile operating system that uses a modified version of the Linux kernel, Google Android’s philosophy is to release early and iterate often. With a rapid relese cycle, there are seven versions of Android platforms and SDK releases now, accompanied by a lot of Android books for developers. But most of them are Android 1.x books, for Android 2.x, till this month, three Android 2.x books are available, below is the details of them.

1 Professional Android 2 Application Development

Professional Android 2 Application Development

Product Description

Build unique mobile applications with the latest Android SDK

Written by an Android authority, this up-to-date resource shows you how to leverage the features of Android 2 to enhance existing products or create innovative new ones. Serving as a hands-on guide to building mobile apps using Android, the book walks you through a series of sample projects that introduces you to Android’s new features and techniques. Using the explanations and examples included in these pages, you’ll acquire the foundation needed to write compelling mobile applications that use Android, along with the flexibility to quickly adapt to future enhancements.

Professional Android 2 Application Development:

* Reviews Android as a development platform and?best practices for mobile development
* Provides an in-depth look at the Android application components
* Details creating layouts and Views to produce compelling resolution independent user interfaces
* Examines Intents and Content Providers for sharing data
* Introduces techniques for creating map-based applications and using location-based services such as GPS
* Looks at how to create and use background Services, Notifications, and Alarms
* Demonstrates how to create interactive homescreen components
* Explores the Bluetooth, telephony, and networking APIs
* Examines using hardware, including the camera and sensors such as the compass and accelerometers

Product Details

* Paperback: 576 pages
* Publisher: Wrox; 1 edition (March 1, 2010)
* Language: English
* ISBN-10: 0470565527
* ISBN-13: 978-0470565520

Professional Android 2 Application Development (Wrox Programmer to Programmer)

2 Beginning Android 2

Beginning Android 2

Product Description

The Android development platform, created by Google and the Open Handset Alliance, is a platform in its truest sense, encompassing hundreds of classes beyond the traditional Java classes and open source components that ship with the SDK.

With Beginning Android 2, you’ll learn how to develop applications for Android 2.x mobile devices, using simple examples that are ready to run with your copy of the SDK. Author, Android columnist, writer, developer, and community advocate Mark L. Murphy will show you what you need to know to get started programming Android applications, including how to craft GUIs, use GPS, and access web services.

What you’ll learn
* Discover Android and how to use it to build Java-based mobile applications for a wide range of phones and other devices.
* Create user interfaces using both the Android widget framework and the built-in WebKit-powered Web browser components.
* Utilize the distinctive capabilities of the Android engine, including location tracking, maps, and Internet access.
* Use and create Android applications incorporating activities, services, content providers, and broadcast receivers.
* Support Android 1.5, 1.6, and 2.0 devices, including dealing with multiple Android OS versions, multiple screen sizes, and other device-specific characteristics.

Who is this book for?

This book is aimed at people new to mobile development, perhaps even to Java development itself.

Product Details
* Paperback: 416 pages
* Publisher: Apress; 1 edition (March 11, 2010)
* Language: English
* ISBN-10: 1430226293
* ISBN-13: 978-1430226291

Beginning Android 2

3 Pro Android 2

Pro Android 2

Product Description

The age of Web 2.0 smart mobile phones and handsets is here. First there was the BlackBerry, then there was the iPhone, and now … there’s Google, with its Android Mobile Software Development Kit (SDK) and platform, and its hardware partners in the Open Handset Alliance. Android works with the HTC G1 and G2 phones, the DROID, and the Nexus One. Android is also available on other mobile phones and devices, including netbooks.

Pro Android 2 shows you how to build real-world and fun mobile applications using Google’s Android SDK. This book covers everything from the fundamentals of building applications for embedded devices to advanced concepts such as custom 3D components.

* Discover the design and architecture of the Android SDK, and how to build mobile applications using the Android SDK.
* Explore and use the Android APIs, including those for media and Wi-Fi.
* Learn about Android 2.0’s integrated local and web search, handwriting gesture UI, Google Translate, and text-to-speech features.

With Android and this book, you’ll be able to build mobile applications ranging from games to Google apps, including add-ons to Google Docs. You’ll be able to extend and run the new Google Chrome APIs on the G1, the G2, and other next-generation Google phones and Android-enabled devices.

What you’ll learn

* How to use Android to build Java-based mobile applications for Google phones with a touch screen or keyboard (thanks to Cupcake’s inclusion as of Android 1.5)
* How to design and architect using Google’s Android SDK
* How to use the Android SDK to write mobile applications for embedded devices
* How to create 3D graphics with OpenGL and custom components
* How to build multimedia and game apps using Android’s Media APIs and OpenGL
* How to use Android’s location-based services, networking (Wi-Fi APIs), and security
* How to create and allow for more integrated local and web searches
* How to build handwriting gesture UIs
* How to incorporate Google Translate into your Android applications

Who is this book for?

This book is for professional software engineers/programmers looking to move their ideas and applications into the mobile space with Android. It assumes that readers have a passable understanding of Java, including being able to write classes and handle basic inheritance structures. This book also targets hobbyists.

Product Details

* Paperback: 736 pages
* Publisher: Apress; 1st Edition. edition (February 26, 2010)
* Language: English
* ISBN-10: 1430226595
* ISBN-13: 978-1430226598

Pro Android 2

5 comments - What do you think?  Posted by CuteAndroid - March 20, 2010 at 1:19 pm

Categories: Android, Android book   Tags: , , ,