Skip to main content

2010 | Buch

Pro Android 2

verfasst von: Sayed Y. Hashimi, Satya Komatineni, Dave MacLean

Verlag: Apress

insite
SUCHEN

Über dieses Buch

Pro Android 2 shows how to build real-world and fun mobile applications using Google's latest Android software development kit. This new edition is updated for Android 2, covering everything from the fundamentals of building applications for embedded devices to advanced concepts such as custom 3D components, OpenGL, and touchscreens including gestures. While other Android development guides simply discuss topics, Pro Android 2 offers the combination of expert insight and real sample applications that work.

Discover the design and architecture of the Android SDK through practical examples, 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's integrated local and web search, handwriting gesture UI, Google Translate, and text-to-speech features.

Pro Android 2 dives deep, providing you with all the knowledge and techniques you need 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.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Introducing the Android Computing Platform
Abstract
Computing continues to become more “personal,” increasingly accessible anytime, anywhere. At the forefront of this development are handheld devices that are transforming into computing platforms. Mobile phones are no longer just for talking—they have been capable of carrying data and video for some time. Significantly, the mobile device is becoming so capable of general-purpose computing that it’s destined to become the next PC (Personal Computer). It is also anticipated that even a number of traditional PC manufacturers such as ASUS, HP, and Dell will be producing devices of various form factors based on the Android OS. The battle lines between operating systems, computing platforms, programming languages, and development frameworks are being shifted and reapplied to mobile devices.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 2. Getting Your Feet Wet
Abstract
In the last chapter, we provided an overview of Android’s history and hinted at concepts we’ll cover in the rest of the book. At this point, you’re probably eager to get your hands on some code. We’ll start by showing you what you need to start building applications with the Android Software Development Kit (SDK) and help you set up your development environment. Next, we’ll baby-step you through a “Hello World!” application and dissect a slightly larger application after that. Then we’ll explain the Android application lifecycle and end with a brief discussion about debugging your applications with Android Virtual Devices (AVDs).
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 3. Using Resources, Content Providers, and Intents
Abstract
In Chapter 2, we gave you an overview of an Android application and a quick look at some of its underlying concepts. You also learned about the Android SDK, the Eclipse ADT (Eclipse Android Development Tool) and how to run your applications on emulators identified by AVDs (Android Virtual Devices).
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 4. Building User Interfaces and Using Controls
Abstract
Thus far, we have covered the fundamentals of Android but have not touched the user interface (UI). In this chapter, we are going to discuss user interfaces and controls. We will begin by discussing the general philosophy of UI development in Android, then we’ll describe the common UI controls that ship with the Android SDK. We will also discuss layout managers and view adapters. We will conclude by discussing the Hierarchy Viewer tool—a tool used to debug and optimize Android UIs.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 5. Working with Menus and Dialogs
Abstract
In Chapter 3, we introduced you to resources, content providers, and intents—the foundations of the Android SDK. Then we covered UI controls and layouts in Chapter 4. In this chapter, we’ll show you how to work with Android menus and dialogs.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 6. Unveiling 2D Animation
Abstract
The previous chapters gave you a broad introduction to UI programming in Android. In this chapter, we would like to further strengthen your ability to create intuitive and appealing applications on the Android Platform by covering the animation capabilities of the Android SDK. If our experience is any guide, animation puts a lot of creativity at the hands of a programmer.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 7. Exploring Security and Location-Based Services
Abstract
In this chapter, we will cover Android’s home screen widgets in detail. Home screen widgets, like live folders, offer one more way of presenting frequently changing information on the home screen of Android. From a high-level perspective, home screen widgets are disconnected views (albeit populated with data) that are displayed on the home screen. The data content of these views is updated at regular intervals by background processes.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 8. Building and Consuming Services
Abstract
The Android Platform provides a complete software stack. This means you get an operating system and middleware, as well as working applications (such as a phone dialer). Alongside all of this, you have an SDK that you can use to write applications for the platform. Thus far, we’ve seen that we can build applications that directly interact with the user through a user interface. We have not, however, discussed background services or the possibilities of building components that run in the background.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 9. Using the Media Framework and Telephony APIs
Abstract
Now we are going to explore two very interesting portions of the Android SDK: media and telephony. In our media discussion in the first part of the chapter, we will show you how to play and record audio and video. In our telephony discussion in the second part of the chapter, we will show you how to send and receive Short Message Service (SMS) messages. We will also touch on several other interesting aspects of the telephony APIs in Android.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 10. Programming 3D Graphics with OpenGL
Abstract
In this chapter, we will talk extensively about working with the OpenGL ES graphics API on the Android Platform.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 11. Managing and Organizing Preferences
Abstract
Like many other SDKs, Android supports preferences. Generally speaking, it tracks preferences for users of an application as well as the application itself. For example, a user of Microsoft Outlook might set a preference to view e-mail messages a certain way, and Microsoft Outlook itself has some default preferences that are configurable by users. But even though Android theoretically tracks preferences for both users and the application, it does not differentiate between the two. The reason for this is that Android applications run on a device that is generally not shared among several users; people don’t share cell phones. So Android refers to preferences with the term application preferences, which encompasses both the user’s preferences and the application’s default preferences.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 12. Exploring Live Folders
Abstract
In Chapter 10, we covered the OpenGL interface on Android in great detail. In Chapter 11, we covered how you manage preferences for your applications on the Android platform. In this chapter, we would like to welcome you to another advanced topic on the Android platform: live folders.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 13. Home Screen Widgets
Abstract
In this chapter, we will cover Android’s home screen widgets in detail. Home screen widgets, like live folders, offer one more way of presenting frequently changing information on the home screen of Android. From a high-level perspective, home screen widgets are disconnected views (albeit populated with data) that are displayed on the home screen. The data content of these views is updated at regular intervals by background processes.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 14. Android Search
Abstract
In the last two chapters we introduced two home page-based Android innovations. In Chapter 12, we explained how live folders can reside on the home page and provide quick access to changing data in content providers. In Chapter 13, we explored home screen widgets that provide snapshots of relevant information right on the home page.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 15. Exploring Text to Speech and Translate APIs
Abstract
Android 1.6 and later features a multilingual speech synthesis engine called Pico. It allows any Android application to speak a string of text with an accent that matches the language. Text to speech allows applications to interact with users without users having to look at the screen. This can be extremely important for a mobile platform. How many people have accidentally walked into traffic when they were reading a text message? What if you could simply listen to your text messages instead? What if you could listen to a walking tour instead of reading while walking? There are countless applications where the inclusion of voice would improve an application’s usefulness. In this chapter, we’ll explore the TextToSpeech class of Android and learn what it takes to get our text spoken to us. We’ll also learn how to manage the locales, languages, and voices available.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 16. Touchscreens
Abstract
Many Android devices incorporate touchscreens. When a device does not have a physical keyboard, much of the user input must come through the touchscreen. Therefore your applications will often need to be able to deal with touch input from the user. You’ve most likely already seen the virtual keyboard that displays on the screen when text input is required from the user. We used touch with mapping applications in Chapter 7 to pan the maps sideways. These implementations of the touchscreen interface have been hidden from you so far, but now we’ll show you how to take advantage of the touchscreen.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 17. Titanium Mobile: A WebKit-Based Approach to Android Development
Abstract
In this chapter, we are going to introduce a novel yet complementary approach to programming applications on the Android platform, inspired by the trend that began with RIA (Rich Internet Applications). Some of the key features of RIA are the ability to drag and drop, provide animation, and talk to servers without refreshing through HTML browsers. Although these activities have been traditionally accomplished through plugins such as Flash, recent advances in RIA accomplish them by taking advantage of the HTML DOM (Document Object Model).
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 18. Working with Android Market
Abstract
Creating a great application that people will love also means you need an easy way for people to find it and download it. Google created Android Market to serve this purpose. From an icon right on the device, users can click straight into the Market to browse, search, review, and download applications. Many applications are free and some are not; the Market provides the payment mechanisms for easy purchasing. The Market is even accessible from intents inside of applications, making it easy for applications to reach out to the Market to guide the user into getting what they need for your application to be successful. For example, when a new version of your application becomes available, you can make it easy for the user to go straight to that Market page to get or buy the new version. Android Market is not the only way to get applications to devices, however, and other channels are popping up on the Internet.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Chapter 19. Outlook and Resources
Abstract
In this last chapter of the book we would like to review the current progress of Android and its future outlook in the mobile marketplace.
Sayed Y. Hashimi, Satya Komatineni, Dave MacLean
Backmatter
Metadaten
Titel
Pro Android 2
verfasst von
Sayed Y. Hashimi
Satya Komatineni
Dave MacLean
Copyright-Jahr
2010
Verlag
Apress
Electronic ISBN
978-1-4302-2660-4
Print ISBN
978-1-4302-2659-8
DOI
https://doi.org/10.1007/978-1-4302-2660-4

Premium Partner