Android in Action, Third Edition
eBook - ePub

Android in Action, Third Edition

Chris King, Frank Ableson, C. Enrique Ortiz

Compartir libro
  1. English
  2. ePUB (apto para móviles)
  3. Disponible en iOS y Android
eBook - ePub

Android in Action, Third Edition

Chris King, Frank Ableson, C. Enrique Ortiz

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Android in Action, Third Edition is a comprehensive tutorial for Android developers. This fast-paced book puts you in the driver's seat—you'll master the SDK, build WebKit apps using HTML 5, and even learn to extend or replace Android's built-in features by building useful and intriguing examples.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Android in Action, Third Edition un PDF/ePUB en línea?
Sí, puedes acceder a Android in Action, Third Edition de Chris King, Frank Ableson, C. Enrique Ortiz en formato PDF o ePUB, así como a otros libros populares de Informatique y Programmation Open Source. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2011
ISBN
9781617290503

Part 1. What is Android? The big picture

Android has become a market-moving technology platform—not just because of the functionality available in the platform but because of how the platform has come to market. Part 1 of this book brings you into the picture as a developer of the open source Android platform. We begin with a look at the Android platform and the impact it has on each of the major stakeholders in the mobile marketplace (chapter 1). We then bring you on board to developing applications for Android with a hands-on tour of the Android development environment (chapter 2).

Chapter 1. Introducing Android

This chapter covers
  • Exploring Android, the open source phone and tabtet platform
  • Android Intents, the way things work
  • Sample application
You’ve heard about Android. You’ve read about Android. Now it’s time to begin unlocking Android.
Android is a software platform that’s revolutionizing the global cell phone market. It’s the first open source mobile application platform that’s moved the needle in major mobile markets around the globe. When you’re examining Android, there are a number of technical and market-related dimensions to consider. This first section introduces the platform and provides context to help you better understand Android and where it fits in the global cell phone scene. Moreover, Android has eclipsed the cell phone market, and with the release of Android 3.X has begun making inroads into the tablet market as well. This book focuses on using SDKs from 2.0 to 3.X.
Android is primarily a Google effort, in collaboration with the Open Handset Alliance. Open Handset Alliance is an alliance of dozens of organizations committed to bringing a “better” and more “open” mobile phone to market. Considered a novelty at first by some, Android has grown to become a market-changing player in a few short years, earning both respect and derision alike from peers in the industry.
This chapter introduces Android—what it is, and, equally important, what it’s not. After reading this chapter, you’ll understand how Android is constructed, how it compares with other offerings in the market, and what its foundational technologies are, plus you’ll get a preview of Android application architecture. More specifically, this chapter takes a look at the Android platform and its relationship to the popular Linux operating system, the Java programming language, and the runtime environment known as the Dalvik virtual machine (VM).
Java programming skills are helpful throughout the book, but this chapter is more about setting the stage than about coding specifics. One coding element introduced in this chapter is the Intent class. Having a good understanding of and comfort level with the Intent class is essential for working with the Android platform.
In addition to Intent, this chapter introduces the four main application components: Activity, Service, ContentProvider, and BroadcastReceiver. The chapter concludes with a simple Android application to get you started quickly.

1.1. The Android platform

Android is a software environment built for mobile devices. It’s not a hardware platform. Android includes a Linux kernel-based OS, a rich UI, end-user applications, code libraries, application frameworks, multimedia support, and much more. And, yes, even telephone functionality is included! Whereas components of the underlying OS are written in C or C++, user applications are built for Android in Java. Even the built-in applications are written in Java. With the exception of some Linux exploratory exercises in chapter 13 and the Native Developer Kit (NDK) in chapter 19, all the code examples in this book are written in Java, using the Android software development kit (SDK).
One feature of the Android platform is that there’s no difference between the built-in applications and applications that you create with the SDK. This means that you can write powerful applications to tap into the resources available on the device. Figure 1.1 shows the relationship between Android and the hardware it runs on. The most notable feature of Android might be that it’s open source; missing elements can and will be provided by the global developer community. Android’s Linux kernel-based OS doesn’t come with a sophisticated shell environment, but because the platform is open, you can write and install shells on a device. Likewise, multimedia codecs can be supplied by third-party developers and don’t need to rely on Google or anyone else to provide new functionality. That’s the power of an open source platform brought to the mobile market.
Figure 1.1. Android is software only. By leveraging its Linux kernel to interface with the hardware, Android runs on many different devices from multiple cell phone manufacturers. Developers write applications in Java.
Platform vs. Device Throughout this book, wherever code must be tested or exercised on a device, a software-based emulator is typically employed. An exception is in chapter 14 where Bluetooth and Sensors are exercised. See chapter 2 for information on how to set up and use the Android emulator.
The term platform refers to Android itself—the software—including all the binaries, code libraries, and tool chains. This book focuses on the Android platform; the Android emulators available in the SDK are simply components of the Android platform.
With all of that as a backdrop, creating a successful mobile platform is clearly a nontrivial task involving numerous players. Android is an ambitious undertaking, even for Google, a company of seemingly boundless resources and moxie—and they’re getting the job done. Within a span of three years, Android has seen numerous major software releases, the release of multiple handsets across most major mobile carriers in the global market, and most recently the introduction of Android-powered tablets.
Now that you’ve got an introduction to what Android is, let’s look at the why and where of Android to provide some context and set the perspective for Android’s introduction to the marketplace. After that, it’s on to exploring the platform itself!

1.2. Understanding the Android market

Android promises to have something for everyone. It aims to support a variety of hardware devices, not just high-end ones typically associated with expensive smartphones. Of course, Android users will enjoy improved performance on a more powerful device, considering that it sports a comprehensive set of computing features. But how well can Android scale up and down to a variety of markets and gain market and mind share? How quickly can the smartphone market become the standard? Some folks are still clinging to phone-only devices, even though smartphones are growing rapidly in virtually every demographic. Let’s look at Android from the perspective of a few existing players in the marketplace. When you’re talking about the cellular market, the place to start is at the top, with the carriers, or as they’re sometimes referred to, the mobile operators.

1.2.1. Mobile operators

Mobile operators (the cell phone companies such as AT&T and Verizon) are in the business, first and foremost, of selling subscriptions to their services. Shareholders want a return on their investment, and it’s hard to imagine an industry where there’s a larger investment than in a network that spans such broad geographic territory. To the mobile o...

Índice