Build your own Android App Dev Empire

Appportunity

This course is designed to help you start a massive app-design business with no prior programming or tech knowledge. Patric Chan has created his own app business, and is now giving a course from his large bank of knowledge on the subject to create a business of your own, designing apps. Once again, this book does NOT require that you have ANY programming or advanced technology knowledge. If you can use a computer, you can start an app business. This course covers all of the essentials of the app design business, and the essentials of how to market apps once you have created them. You do not need to know anything about internet marketing to start; this course covers all of the information that you need to know about how to market apps. This course does not have any prerequisites to be able to start making money Anyone can do it! More here...

Appportunity Overview

Rating:

4.8 stars out of 16 votes

Contents: Premium Membership
Author: Patric Chan
Official Website: appportunity.com
Price: $9.77

Access Now

Appportunity App Solutions Review

Highly Recommended

This e-book comes with the great features it has and offers you a totally simple steps explaining everything in detail with a very understandable language for all those who are interested.

I personally recommend to buy this ebook. The quality is excellent and for this low price and 100% Money back guarantee, you have nothing to lose.

Read full review...

Welcome to the Android SDK

If you've just downloaded the SDK, then continue with Installing the Android SDK. Once you've completed the SDK installation, you can start learning about development on the Android framework by reading the Developer's Guide. The SDK package also includes a wide variety of code samples specific to each Android platform. You can find the samples at this location

Android Documentation

The Android platform is a software stack for mobile devices including an operating system, middleware and key applications. Developers can create applications for the platform using the Android SDK. Applications are written using the Java programming language and run on Dalvik, a custom virtual machine designed for embedded use which runs on top of a Linux kernel. An early look at the the Android SDK is also available. It includes sample projects with source code, development tools, an emulator, and of course all the libraries you'll need to build an Android application. To start learning about the Android platform, please read the documentation in the following order An overview of the Android platform The nuts and bolts of Android applications Several sample Android applications for your viewing pleasure Frequently Asked Questions Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK...

Setting Up Your Android Development Environment

Upgrading the Android SDK 31 Problems with the Android Software Development Kit 32 Exploring the Android SDK 32 Understanding the Android SDK License Agreement 32 Reading the Android SDK Documentation 33 Exploring the Android Application Framework 35 Getting to Know the Android Tools 35 Exploring the Android Sample Applications 40 Summary 41

Writing Your First Android Application

Creating a Launch Configuration for Your Snake Project 46 Running the Snake Application in the Android Emulator 47 Building Your First Android Application 48 Creating and Configuring a New Android Project 50 the Android Application 50 Running Your Android Application in the Emulator 53 Debugging Your Android Application in Adding Logging Support to Your Android Application 59

Creating Android Projects

The Android Project Wizard creates all the required files for an Android application. Open Eclipse and follow these steps to create a new project 1. Choose File, New, Android Project or click the Android Project creator icon, which looks like a folder (with the letter a and a plus sign The first time you try to create an Android Project, you might need to choose File, New, Project and then select the Android, Android Project. After you have done this once, it appears in the Eclipse project types and you can use the method described in Step 1. An activity is a core component of the Android platform. Each activity represents a task the application can do, often tied to a corresponding screen in the application user interface. The Droid 1 application has a single activity, called DroidActivity, which has a single responsibility to display a String to the user. We will talk more about activities in Hour 3, Building Android Applications. 8. Confirm that the Min SDK Version field is...

Debugging Android Applications Using DDMS

The DDMS perspective can be used to monitor application processes, as well as interact with the emulator. You can simulate voice calls and send SMS messages to the emulator. You can send a mock location fix to the emulator to mimic location-based services. You will learn more about DDMS and the other tools available to Android developers in Hour 2, Mastering the Android Development Tools.

Anatomy of an Android Application

There are four building blocks to an Android application Once you have decided what components you need for your application, you should list them in a file called AndroidManifest.xml. This is an XML file where you declare the components of your application and what their capabilities and requirements are. See the Android manifest file documentation for complete details.

Android SDK Components

Figure 1.1 Installing the Android SDK Components Figure 1.1 Installing the Android SDK Components To make development easier, Google has written a plug-in for Eclipse called the Android Development Toolkit (ADT). To install the plug-in, follow these steps (note these directions are for Eclipse 3.5 different versions may have slightly different menus and options) Figure 1.2 Installing the Android Development Toolkit Figure 1.2 Installing the Android Development Toolkit 5. Enter the location of the Android Development Tools update site

Using the Android Documentation

Although it is not a tool, per se, the Android documentation is a key resource for Android developers. An HTML version of the Android documentation is provided in the docs sub-folder of the Android SDK documentation, and this should always be your first stop when you encounter a problem. You can also access the latest help documentation online at the Android Developer website, http developer.android.com. The Android documentation is divided into six sections (see Figure 2.1) Dev Guide This tab links to the Android Developer's Guide, which includes a number of FAQs for developers, as well as step-by-step examples and a useful glossary of Android terminology for those new to the platform. Reference This tab includes a searchable package and class index of all Android APIs provided as part of the Android SDK. Blog This tab links to the official Android developer blog. Check here for the latest news and announcements about the Android platform. This is a great place to find how-to...

Working with the Android Emulator

The Android emulator is probably the most powerful tool at a developer's disposal. It is important for developers to learn to use the emulator and understand its limitations. The Android emulator is integrated with Eclipse, using the ADT plug-in for the Eclipse IDE. The Android emulator is a convenient tool, but it has a number of limitations Using Android emulator is not a substitute for testing on a true target handset or device.

Using Android 3D Graphics with OpenGL ES 367

Leveraging OpenGL ES in Android 368 Ensuring Device Compatibility 368 Using OpenGL ES APIs in the Android SDK 369 Handling OpenGL ES Tasks Manually 369 Creating a SurfaceView 370 Starting Your OpenGL ES Thread 371 Initializing EGL 373 Initializing GL 374 Drawing on the Screen 375 Drawing 3D Objects 376 Drawing Your Vertices 376 Coloring Your Vertices 377 Drawing More Complex Objects 378 Lighting Your Scene 379 Texturing Your Objects 381 Interacting with Android Views and Events 383

Using Other Android Tools

Although we've already covered the most important tools, a number of other special-purpose utilities are included with the Android SDK AIDL Compiler Helps developers create remote interfaces to facilitate interprocess communication (IPC) on the Android platform. Developing Android Applications Without Eclipse Eclipse is the preferred development environment for Android, but it is not required for development. The ADT plug-in for Eclipse provides a convenient entry point for many of the underlying development tools for creating, debugging, packaging, and signing Android applications. Developers who do not use Eclipse or require some of the more powerful debugging features not available in the Eclipse ADT plug-in can access these underlying tools directly from the command line. Tools such as the following are found in the tools directory of the Android SDK android Creates Android project files and to manage AVDs. aapt (Android Asset Packaging Tool) Packages Android project files into...

Your First Native Android

You will need an Android project to host your native application, but before you create that, you must create an Android Virtual Device (AVD). Android 1.1 This target maps to the Android SDK version 1.1 R2. Android 1.5 This target maps to the Android SDK version 1.5 R2. Android 1.6 This target maps to the Android SDK versions 1.6 and 2.0. 1. In Eclipse Galileo, click the black phone icon on the Android toolbar (see Figure 2-1). This opens the Android Virtual Devices Manager dialog box. Figure 2-1. Android toolbar within Eclipse Figure 2-3. Creating a new AVD in Android SDK 1.6 Figure 2-3. Creating a new AVD in Android SDK 1.6 Creating the Android Project 1. Click the New Android Project icon on the main toolbar (see Figure 2-1). This opens the New Android Project dialog box. 6. Specify a minimum SDK version (3 in this example). Figure 2-4 shows the completed New Android Project dialog box for this example. Figure 2-4. New Android Project dialog box for this chapter's example Figure...

Creating an Android Project

The ADT plugin provides a New Project Wizard that you can use to quickly create a new Android project (or a project from existing code). To create a new project 2. Select Android > Android Project, and click Next. o Under Target, select an Android target to be used as the project's Build Target. The Build Target specifies which Android platform you'd like your application built against. Enter a Min SDK Version. This is an integer that indicates the minimum API Level required to properly run your application. Entering this here automatically sets the minSdkVersionattribute in the < uses-sdk> of your Android Manifest file. If you're unsure of the appropriate API Level to use, copy the API Level listed for the Build Target you selected in the Target tab. AndroidManifest.xml The Android Manifest for your project. See The AndroidManifest.xml File.

How the Android Market Handles Locales

The Android Market supports a subset of the locales available on the Android platform. Because the Android Market uses the Google Checkout system for payments, only countries where this online marketplace is legal can be supported for paid applications. For a more complete explanation of how the Android operating system resolves resources, check out the Android developer website http developer.android. For a complete list of the countries and languages supported by the Android Market, see Note that the Android Market differentiates between countries that allow only free applications and countries where developers can distribute fee-based applications. Developers must register to sell applications on the Android Market. A complete list of countries where developers of free Android apps may reside (which is different from where they may publish) is available at http market.android.com

Android SDK and AVD Manager

The Android SDK and AVD Manager, shown in Figure 2.5, is a tool integrated into Eclipse.This tool performs two major functions management of multiple versions of the Android SDK on the development machine and management of the developer's Android Virtual Device (AVD) configurations. Figure 2.5 The Android SDK and AVD Manager. Figure 2.5 The Android SDK and AVD Manager. Much like desktop computers, different Android devices run different versions of the Android operating system. Developers need to be able to target different Android SDK versions with their applications. Some applications target a specific Android SDK, whereas others try to provide simultaneous support for as many versions as possible. The Android SDK and AVD Manager facilitate Android development across multiple platform versions simultaneously. When a new Android SDK is released, you can use this tool to download and update your tools while still maintaining backward compatibility and use older versions of the Android...

Defining the Android Manifestxml

With our introductory tour of the main components of the Android platform and development environment complete, it is time to look more closely at the fundamental Android concepts surrounding activities, views, and resources. Activities are essential because, as you learned in chapter 1, they make up the screens of your application and play a key role in the all-important Android application lifecycle. Rather than allowing any one application to wrest control of the device away from the user and from other applications, Android introduces a well-defined lifecycle to manage processes as needed. This means it is essential to understand not only how to start and stop an Android Activity but also how to suspend and resume one. Activities themselves are made up of subcomponents called views. Along with the components you use to build an application views, resources, and activities Android includes the manifest file you were introduced to in chapter 1, AndroidManifest. xml. This XML file...

Creating an Android Application without the Eclipse Plugin

This topic describes the manual steps in creating an Android application. Before reading this, you should read Overview of an Android Application to understand the basics of how an Android application works. You might also want to look at the sample applications that ship with Android under the samples directory. 1. Create your required resource files This includes the AndroidManifest.xml global description file, string files that your application needs, and layout files describing your user interface. A full list of optional and required files and syntax details for each is given in File List for an Android Application. 3. Implement your Activity (this page) You will create one class file for each screen in your application. Screens will inherit from an android.app class, typically android.app.Activity for basic screens, android.app.ListActivity for list screens, or android.app.Dialog for dialog boxes. You will implement the required callbacks that let you draw your screen, query...

Running Your Android Application in the Emulator

The Android emulator starts up, which might take a moment. 9. Click on the My First Android Application icon to launch the application again. Figure 3.10 My First Android App running in the emulator. Figure 3.10 My First Android App running in the emulator. Figure 3.11 My First Android App application icon in the Drawer.

Installing the Android SDK

You need to install the Android SDK to develop Android applications. The Android SDK includes the Android JAR file (Android application framework classes) as well as Android documentation, tools, and sample code. The Android SDK is available from the Android Developer website, at http developer. android.com sdk index.html. You need to agree to the Android license agreement prior to installing the developer package. Newer versions of the Android SDK have a helpful installer. You simply download the compressed file, unzip it into the desired folder, and launch the setup. The compressed SDK files require about 25MB of hard drive space and uncompress to a size of approximately 40MB. The Android tools and SDK versions are componentized. This means that instead of installing one large package for development for all supported versions of Android, you can pick and choose the Android SDK versions you want to install and work with using the Android SDK and AVD Manager. This tool allows...

Creating and Configuring a New Android Project

You can create a new Android project in much the same way as when you added the Snake application to your Eclipse workspace. The first thing you need to do is create a new project in your Eclipse workspace.The Android Project Wizard creates all the required files for an Android application. Follow these steps within Eclipse to create a new project 1. Choose File, New,Android Project, or choose the Android Project creator icon, which looks like a folder (with the letter a and a plus sign), on the Eclipse toolbar. 5. Choose an application name.The application name is the friendly name of the application and the name shown with the icon on the application launcher. In this case, the Application Name is My First Android App.

Creating an Android Application using the Eclipse Plugin

Using the Android Eclipse plugin is the fastest and easiest way to start creating a new Android application. The plugin automatically generates the correct project structure for your application, and keeps the resources compiled for you automatically. It is still a good idea to know what is going on though. Take a look at Overview of an Android Application to understand the basics of how an Android application works. Finally, a great way to started with Android development in Eclipse is to follow both the Hello Android and Notepad code tutorials. In particular, the start of the Hello Android tutorial is an excellent introduction to creating a new Android application in Eclipse.

Personalizing Android Devices

Personalization of a device involves allowing the user to change the look and behavior of their user experience. From the software side, personalization involves configuring features such as the wallpaper, ringtone, and such. Android allows a deep level of customization and personalization. Alternate home screens, themes, graphics, and sounds can be modified. Android applications can provide many of these personalization features to users. For instance, a branded application might allow the users to set ringtones and wallpapers that support the brand.

Getting to Know the Android Tools

The Android SDK provides many tools to design, develop, debug, and deploy your Android applications.The Eclipse Plug-In incorporates many of these tools seamlessly into your development environment and provides various wizards for creating and debugging Android projects. Settings for the ADT plug-in are found in Eclipse under Window, Preferences, Android. Here you can set the disk location where you installed the Android SDK and tools, as well as numerous other build and debugging settings. Launch the Android SDK and AVD Manager Create a new project using the Android Project Wizard Create a new test project using the Android Project Wizard There is also a special Eclipse perspective for debugging Android applications called DDMS (Dalvik Debug Monitor Server).You can switch to this perspective within Eclipse by choosing Window, Open Perspective, DDMS or by changing to the DDMS perspective in the top-right corner of the screen.We talk more about DDMS later in this chapter. After you...

Android Debug Bridge ADB

The Android Debug Bridge (ADB) is a client-server tool used to enable developers to debug Android code on the emulator and the device using a standard Java IDE such as Eclipse.The DDMS and the Android Development Plug-In for Eclipse both use the ADB to facilitate interaction between the development environment and the device (or emulator). Developers can also use ADB to interact with the device file system, install Android applications manually, and issue shell commands. For example, the sqlite3 shell commands enable you to access device database. The Application Exerciser Monkey commands generate random input and system events to stress test your application. One of the most important aspects of the ADB for the developer is its logging system (Logcat). For more information about the ADB, see Appendix C, The Android Debug Bridge Quick-Start Guide. For an exhaustive reference, see the Android SDK Documentation at

Exploring the Android Application Framework

The Android application framework is provided in the android.jar file. The Android SDK is made up of several important packages, as shown in Table 2.1. Table 2.1 Important Packages in the Android SDK Table 2.1 Important Packages in the Android SDK Android application fundamentals There is also an optional Google APIs Add-On, which is an extension to the Android SDK that helps facilitate development using Google Maps and other Google APIs and services. For example, if you want to include the MapView control in your application, you need to install and use this feature.This Add-On corresponds to the com.google.* package (including com.google.android.maps) and requires agreement to additional Terms of Service and registration for an API Key. For more information on the Google APIs Add-On, see

Android Application Level Modularity and Telephony

Getting modularity right is difficult. In the case of Android, the problem is especially difficult mobile phones were not designed to have replaceable software components, but Android is all about replaceable, modular parts. Every part of the Android application environment, even core components that handle phone calls and talk to the mobile radio, can be replaced by code you can write. Android provides a practical, usable, and flexible system for modularity for telephony applications. It uses the Android system of Intent objects and activities that listen for Intent objects that indicate they should handle a particular request. In this case, we see that the Intent class and the activities and data you need to specify when making Android Application-Level Modularity and Telephony 285

Setting the Minimum Android SDK Version

Android applications can be compiled for compatibility with several different SDK versions. You use the < uses-sdk> tag to specify the minimum SDK required on the handset in order for the application to build and run properly. The android minSdkVersion attribute of this tag is an integer representing the minimum Android SDK version required. Table 5.1 shows the Android SDK versions available for shipping applications. TABLE 5.1 Android SDK Versions Available TABLE 5.1 Android SDK Versions Available Android SDK Version Each time a new Android SDK is released, you can find the SDK version number in the SDK release notes. This is often referred to as the API Level within the tools, especially the Android SDK and AVD Manager.

B1 Recapping the Android Debug Bridge

Although we covered the Android Debug Bridge (adb) in chapter 2, a recap is in order as background for signing and installing applications and working with Android devices. The adb is a client server program that lets you interact with the Android SDK in various ways, including pushing and pulling files, installing and removing applications, issuing shell commands, and more. The adb tool comprises three components a development machine-based server, a development machine client for issuing commands, and a client for each emulator or device in use. (Other Android tools, such as the DDMS tool, also create clients to interact with the adb.) There are many more adb commands and uses than we are addressing here, of course, and obviously adb is very important in terms of developing Android applications (it is the chassis of the entire SDK), but it's important to understand that it supports both the emulator and any connected physical devices. The first step in getting your applications onto...

The Android Manifestxml

The AndroidManifest.xml is a required file for every Android application. It is located in the root folder of the application, and describes global values for your package, including the application components (activities, services, etc) that the package exposes to the 'outer world', what kind of data each of our Activities and co. can handle, and how they can be launched. AndroidManifest.xml.

List of Files for an Android Application

The following list describes the structure and files of an Android application. Many of these files can be built for you (or stubbed out) by the activityCreator.py application shipped in the tools menu of the SDK. See Building an Android Sample Application for more information on using activityCreator.py. AndroidManifest.xml (required) Advertises the screens that this application provides, where they can be launched (from the main program menu or elsewhere), any content providers it implements and what kind of data they handle, where the implementation classes are, and other application-wide information. Syntax details for this file are described in AndroidManifest.xml.

Lifecycle of an Android Application

In most cases, every Android application runs in its own Linux process. This process is created for the application when some of its code needs to be run, and will remain running until it is no longer needed and the system needs to reclaim its memory for use by other applications.

Alternatives to the Android Market

Other independent Android app stores exist. They might not have as convenient access to Android devices as the Google market does, but they provide other benefits for developers such as better app visibility, more places to charge for apps, and taking no portion of the proceeds from an app. Also, some Android manufacturers create customized app stores accessible from their devices. For example, getting app visibility onto Motorola Android phones in the China and Latin American markets can be done through the Motorola app market at

Breaking into the Android Market Top Paid Apps

Perhaps the most popular question asked concerning the marketing of an Android app is, How do I get my app in the top paid apps for my category Developers know that if they can get their apps into the top paid apps, they are certain to see significant numbers of downloads and huge sales volume. This is an accurate assumption and was described as hitting the grand slam in the first chapter of this book. Being in the top category in app sales is the Holy Qrail for Android app developers. In this chapter, we will review the key elements of a successful app, which include pricing, promotions, positioning, and integration, to name a few. Doing all these well to the extent possible will increase your chances of building the next best-selling Android app.

Installing and Configuring the Android Plugin for Eclipse ADT

The Android Plug-in for Eclipse allows seamless integration with many of the Android development tools. If you're using Eclipse, it's highly recommended that you install the in, as it will make your life much easier. The Plug-in includes various wizards for creating and debugging Android projects. To install the Android Plug-in for Eclipse (ADT), you must launch Eclipse and install a custom software update. The steps required depend on the version of Eclipse you use. For complete instructions, see the Android developer website, 6. On the Available Software tab, check the box next to Developer Tools box. (Also check the boxes for Android DDMS and Android Development Tools.) After you install the Android SDK Eclipse plug-in, update your Eclipse preferences to point at the Android SDK you previously downloaded. To do this, launch Eclipse and

Upgrading the Android SDK

The Android SDK is upgraded from time to time.You can easily upgrade the Android SDK and tools from within Eclipse using the Android SDK and AVD Manager, which is installed as part of the ADT plug-in for Eclipse. Changes to the Android SDK might include addition, update, and removal of features package name changes and updated tools.With each new version of the SDK, Google provides the following useful documents

Developing for Different Android SDKs

At the time of this writing, there are six different versions of the Android SDK in users' hands Android 1.1, Android 1.5, Android 1.6, Android 2.0, Android 2.0.1, and Android 2.1. The upcoming releases (codenamed Froyo and Gingerbread) will add to this list. From time to time, Google publishes a breakdown of the usage of various Android versions on handsets 0.1 of users are using Android SDK 1.1. 38.0 of users are using Android SDK 1.5. 31.6 of users are using Android SDK 1.6. 0.3 of users are using Android SDK 2.0. 2.7 of users are using Android SDK 2.0.1. 27.3 of users are using Android SDK 2.1. This data was collected and provided online by the Android developer website during the two weeks prior to April 4, 2010. You can check for updated statistics at the following Android developer website http developer.android.com resources dashboard platform-versions.html. One particularly interesting factor is that some versions of the SDK are effectively skipped by most devices, such as...

The Android Emulator Quick Start Guide 613

Simulating Reality The Emulator's Purpose 613 Working with Android Virtual Devices (AVDs) 615 Using the Android SDK and AVD Manager 616 Creating an AVD 616 Launching the Emulator with a Specific AVD 620 Configuring Emulator Startup Options 621 Launching an Emulator to Run an Application 621 Launching an Emulator from the Android SDK and AVD Manager 623 Configuring the GPS Location of the Emulator 623 Calling Between Two Emulator Instances 625 Messaging Between Two Emulator Instances 625 Interacting with the Emulator Through the Console 628 Using the Console to Simulate Incoming Calls 628 Using the Console to Simulate SMS Messages 629 Using the Console to Send GPS Coordinates 630 Using the Console to Monitor Network Status 631 Using the Console to Manipulate Power Settings 631 Using Other Console Commands 632 Enjoying the Emulator 632 Understanding Emulator Limitations 632

Configuring the Android Plugin for Eclipse

After installing the Android plugin for Eclipse, Eclipse should have prompted you to restart the application. If it did not prompt you, restart Eclipse now. Restarting Eclipse will ensure that the program has a chance to reinitialize with the plugin installed. It is The Android plugin for Eclipse is configured from the Preferences window of Eclipse. Proceed as follows 2. In the Preferences window, shown next, select Android in the menu on the left. On the right side of the window, click Browse, find the location of the Android SDK on your hard drive, and enter it in the SDK Location field. Eclipse needs this information to be able to access all the tools that are supplied with Android, such as the emulator.

Android Manifestxml

This section contains the full code of the current AndroidViews' AndroidManifest.xml. If you are following along in Eclipse, modify your Activity's AndroidManifest.xml to look as follows < manifest < application < activity android name .AndroidViews package android_programmers_guide.AndroidViews import android.app.Activity import android.os.Bundle import android.view.View import android.widget.RadioGroup import android.widget.Button import android.graphics.Color

Exploring the Android Manifest File

The Android manifest file, named AndroidManifest.xml, is an XML file that must be included at the top level of any Android project. The Android system uses the information in this file to do the following If you use Eclipse with the ADT plug-in for Eclipse, the Android project wizard will create the initial AndroidManifest.xml file with default values for the most important configuration settings. You can edit the Android manifest file by using the Eclipse manifest file resource editor or by manually editing the XML. AndroidManifest.xml

The Android Manifestxml File

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Among other things, the manifest does the following It describes the components of the application the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched.

Building an Android application in Eclipse

We are going to build a simple application that gives us the opportunity to modify the UI, provides a little application logic, then executes the application in the Android Emulator. More complex applications are left for later chapters our focus here is on the development tools. Building an Android application is not too much different from creating other types of Java applications in the Eclipse IDE. It all starts with choosing File > New and selecting an Android application as the build target. Like many development environments, Eclipse provides for a wizard interface to ease the task of creating a new application. We'll use the Android Project Wizard to get off to a quick start in building an Android application.

Uploading Your App to the Android Market

All that is left to do is upload our signed binary to the Android Market. > You need to be a registered Android Developer to upload your app. If have not already registered, you can do so at http market.android.com publish signup. The process is quick and easy you just fill out a bit of profile information (name, email, phone, etc.), pay a 25 registration fee (using Google Checkout), and agree to the Android Market Developer Distribution Agreement. Figure 8-4. Navigate to the Android Market upload page to submit your app Congrats Your app will be available in the Android Market almost immediately.

Preparing the Android Manifest File for Release

Before release, you need to make a number of changes to the application configuration settings of the Android manifest file. Some of these changes are simply common sense, and others are imposed by marketplaces such as the Android Market. You should review the Android manifest file as follows Verify that the application version code is set appropriately. The version code is a number that the Android platform uses to manage application upgrades. Consider incrementing the version code for the release candidate in order to differentiate it from the prerelease version of the application. Confirm that the application uses-sdk setting is set correctly. You can set the minimum, target, and maximum Android SDK versions supported with this build. These numbers are saved as the API level of each Android SDK. For example, Android 2.1 is API level 7.

Submitting Your Android

When you submit your app to the Android Market, you first need to register with the service using your Google account and agree to the terms of service. Once you are registered, you can upload your application to the service whenever you want, as many times as you want, and then publish it when you are ready. Once published, users can see your application, download it, and rate it using the Market application installed on their Android-powered devices. An example of the Android Market developers site instructions is shown in Figure 8.2. Figure 8.2 You can upload your app make it available on the Android Market at anytime. Figure 8.2 You can upload your app make it available on the Android Market at anytime. The Google Developers Guide states the following about distributing your app Requirements enforced by the Android Market server

Uploading an Application to the Android Market

Now that you have an account registered for publishing applications through Android Market and a signed application package, you are ready to upload it. From the main page of the Android Market website, sign in and click the Upload Application button, as shown in Figure 24.3. Android Market listings. Countries (locations) where the application will be published These locations are subject to export compliance laws, so choose your locations carefully. As of this writing, nearly 50 locations are available, and new locations are being added regularly. In addition, you can choose specific carriers for each location to further limit application distribution. Alternatively, you can choose All Locations to include any future locations supported by the market. For a complete list of locations where Android applications can be sold or published for free, see http market.android.com support bin answer.py hl en& answer 138294. Application type and category Spend the time to set these fields...

Optimize Your Web and Android Market Copy

Carefully choose the name of your app and think about keywords you might be able to use in your app's name that will be common to users searching the Android Market. Descriptive words such as Easy, Fun, Fast, and Exciting are all common terms used in searches. If your app has these types of words, it is more likely to show up in the search results at the top of the list. Google keeps upping the quality of the Android Market search engine. When the store was initially launched the search capabilities were fairly primitive. But, with each upgrade of the Android Market, the search capability seems to improve. Google is becoming sophisticated in properly identifying the right apps for the search terms entered. If your app is connecting to another popular app such as Twitter or Facebook, be sure to mention the app by name in the body of your copy. This can help your app to appear when someone does a search for these popular apps. You'll also want to add keywords to your web copy to assist...

Android Market Text Lighten It Up

In this mobile society, people are reading less when it comes to their communications. Attention spans are short, and with the crush of information thrown at us each day, there is limited time to listen to each seller's message and review buying options. Hence, we see the 15-second commercial and the massive popularity of Twitter. When buyers take the time to read the text for your app on the Android Market, they are interested in downloading it. Most people will not make the investment in time to read your words unless they have more than a casual interest in your app. So, you've gotten them this far in the process, you need to make the most of your words. Figure 5.9 illustrates a good balance of text and white space, helping the reader to understand quickly the benefits of the app. There is no exact science to achieve perfect content. However, the rule of less is more works best. Here are ten suggestions for your Android Market text to help you captivate your reader's attention...

Ten Great Android Applications

M f you've taken a glance at Chapter 18, you're probably well acquainted with the Android Market. There's a problem, though With hundreds of applications offered in the Market and more added every day, it can be nearly impossible to cut through the fat and figure out what's worth downloading. That's a tough problem to solve and no two people will love exactly the same Android applications but I've boiled down the treasure trove of goodies offered by the Market to a list of ten must-try apps. Go ahead and live it up. The applications are free, after all, and if you decide an app isn't for you, you can always uninstall it.

Publishing on the Android Market

After you click the Publish button, the application appears in the Android Market almost immediately. Once your app is published, you can see statistics including ratings, reviews, downloads, active installs, and so on in the Your Android Market Listings section of the main page on your developer account. These statistics aren't updated as frequently as the publish action, and you can't see review details directly from the listing. Unlike some other mobile platforms you may have used, Android does not currently provide built-in billing APIs that work directly from within applications or charge directly to the user's cell phone bill. Instead, Android Market uses Google checkout for processing payments. Once an application is purchased, the user owns it. If your application requires a service fee or sells other goods within the application (for example, ringtones, music, ebooks), you need to develop a custom billing mechanism. Most Android devices can leverage the Internet, so using...

Finding Apps in the Android Market

So if hundreds of applications are available in the Android Market, how can you find the one that's right for you As with most things Android, you have choices. You can find an app in more than one way, just as there are so many different types of apps available. The most general method of finding applications in the Android Market is to simply browse. You can browse applications in several ways 1. From the applications menu, select the Android Market icon. 2. You're taken to the Android Market (see Figure 9.1). From here, you can select Applications, Games, Search, or My Downloads. At the Android Market, you'll find both games and productivity applications for your Android-based device. Back on the main Android Market page is one additional option that we haven't talked about yet. My Downloads takes you to a list of the applications that you've downloaded and that are still installed on your device. If you've downloaded applications and deleted them from the device, they won't show...

Using the Android Manifestxml

The Android manifest file is a specially formatted XML file. You can edit the XML manually in the AndroidManifest.xml tab of the manifest file resource editor (see Figure 5.5). Figure 5.5 shows the Android manifest file for the Droidl project you created in the first hour, which has fairly simple XML. AndroidManifest .xml tab of the Eclipse manifest file resource editor. Figure 5.5 shows the Android manifest file for the Droidl project you created in the first hour, which has fairly simple XML.

Tweaking the Android Manifestxml File

Your final step in the process to create the test harness is to update the application's AndroidManifest.xml file. This file, which is automatically created for you when you create a new project, is available in your project's root directory. Listing 5-13. The AndroidManifest.xml File for the Test Harness < xml version 1.0 encoding utf-8 > < manifest android versionCode 1 < application android icon drawable icon android label Sample Menus> < activity

Create a New Android Project

After you've created an AVD, the next step is to start a new Android project in Eclipse. If the ADT Plugin for Eclipse has been successfully installed, the resulting dialog should have a folder labeled Android which should contain Android Project. (After you create one or more Android projects, an entry for Android XML File will also be available.) 2. Selected Android Project and click Next. New Android Project Creates a new Android Project resource Your package name must be unique across all packages installed on the Android system for this reason, it's very important to use a standard domain-style package for your applications. The example above uses the com.example namespace, which is a namespace reserved for example documentation when you develop your own applications, you should use a namespace that's appropriate to your organization or entity. This value specifies the minimum API Level required by your application. If the API Level entered here matches the API Level provided by...

Listing 919 Android Manifestxml

< manifest android versionCode 1 android versionName 1.0> < application android icon drawable icon Now the content provider is ready for other applications to use.To test this content provider, a new Android project can be created called DataStorageTester with main activity DataStorageTester.This is shown in Listing 9.20.An instance of the ContentResult is created to query the data from the DataStorage content provider.After a Cursor is returned, the testing function parses the second column of each data entry and concatenates into a String to display on the screen using a StringBuilder object.

Intents List Invoking Google Applications on Android Devices

The table below lists the intents that your application can send, to invoke Google applications on Android devices in certain ways. For each action uri pair, the table describes how the receiving Google application handles the intent. A zoom of 1.0 is 90 degree horizontal FOV for a nominal landscape mode 4 x 3 aspect ratio display Android phones in portrait mode will adjust the zoom so that the vertical FOV is approximately the same as the landscape vertical FOV. This means that the horizontal FOV of an Android phone in portrait mode is much narrower than in landscape mode. This is done to minimize the fisheye lens effect that would be present if a 90 degree horizontal FOV was used in portrait mode.

Can I get a fix directly from the Android Platform Project

Android is a mobile platform that will be released as open source and available for free use by anybody. This means that there will be many Android-based products available to consumers, and most of them will be created without the knowledge or participation of the Android Open Source Project. Like the maintainers of other open source projects, we cannot build and release patches for the entire ecosystem of products using Android. Instead, we will work diligently to find and fix flaws as quickly as possible and to distribute those fixes to the manufacturers of the products.

Recipe Using the Android Debug Bridge

The Android Debug Bridge (ADB) provides a way to manage the state of an emulator instance or USB-connected Android device.The ADB is built of three components a client, a server, and a daemon. The client component is initiated by the ADB shell script on the development machine. The server component runs as a background process on the development machine.This server can be started or stopped using one of the following commands

Using the Android Debug Bridge

It is often convenient to use the command line to access the Android device. This is possible when it is connected to a computer using the USB cable. The Android Debug Bridge, which comes with the SDK, can be used to access the Android device. For example, to log into the Android device as if it were a Linux computer, type the following

Debugging Your Android Application in the Emulator

Before we go any further, you need to become familiar with debugging in the emulator. To illustrate some useful debugging tools, let's manufacture an error in the My First Android Application. It takes a moment for the emulator to start up and for the debugger to attach. If this is the first time you've debugged an Android application, you need to click through some dialog Figure 3.12 My First Android App crashing gracefully. Figure 3.12 My First Android App crashing gracefully. Figure 3.13 Switching debug perspectives for Android emulator debugging. Figure 3.13 Switching debug perspectives for Android emulator debugging. Figure 3.14 Debugging My First Android App in Eclipse. Figure 3.14 Debugging My First Android App in Eclipse.

Download the Android SDK

PhoneGap works in conjunction with the Android SDK, so before we can get started with PhoneGap, we need to download and install the Android SDK itself. Follow the steps here to do so 1. Navigate to the Android SDK download page and download the package appropriate for your platform. If you are on Windows or Linux, you will need to install Java (see http java.sun.com javase downloads) first. My development machine is a MacBook Pro running Mac OS X 10.6, so in my case, the appropriate package is android-sdk_r06-mac_86.zip for Mac OS X (Intel) (Figure 7-1). The 06 in the SDK filename refers to the version of the Android SDK and may be different at the time you read this. Android SDK 1 Android Developers Download the Android SDK Welcome Developers If you are new to the Android SDK, pie* for an overview of how to install and set up the SDK. If you are already using the Android SDK and would like to update to the latest tools or platforms, please use the Android SDK and A VD Manager to get...

Publishing Upgrades on Android Market

The beta version of Android Market does not support notifying your users when you publish a new version of your application. This capability will be added soon, but currently the user must independently initiate download of an upgraded application. When you publish an upgrade, you can assist users by notifying them that the upgrade is available and giving them a way to download the upgraded application from Android Market. The sections below provide information about publishing your Android application to mobile device users. Publishing on Android Market The URI that your web service returns should be properly formatted to search Android Market for your upgraded application. See Using Intents to Launch the Market Application for more information. The URI should specify the upgraded application's package name as the query parameter, since the package name is guaranteed to be unique on Android Market. The URI format for the package name search is

Listing 1113 Android Manifestxml

< manifest android versionCode 1 android versionName 1.0> < uses-sdk < application Inside the MyBandRActivity activity, the BackupManager instance is created in the onCreate() function.To ask for a backup, the dataChanged() function is called from the BackupManager.Then the BackupManager finds the BackupAgent defined in the AndroidManifest file and calls its onBackup() method. Android provides two ways to trigger the restore.The first method is to use requestRestore() from the BackupManager.This method triggers a call to the backup agent's onRestore() method.Another way to trigger a restore is whenever the user does a factory data reset or when the application is reinstalled. The Android system then automatically triggers the restore for the application. Besides triggering the backup and restore in an Android application, Android also provides a command-line script bmgr that can do the same thing. To trigger the backup, type

Components of an Android Application

Lifecycle Activity Android

Your Android applications will be built from four basic component types that are defined by the Android architecture These respond to requests for service from another application. A Broadcast Receiver responds to a system-wide announcement of an event. These announcements can come from Android itself (e.g., battery low) or from any program running on the system. An Activity or Service provides other applications with access to its functionality by executing an Intent Receiver, a small piece of executable code that responds to requests for data or services from other activities. The requesting (client) activity issues an Intent, leaving it up to the Android framework to figure out which application should receive and act on it.

Defining an Android Application The Manifest File

An Android application can consist of a multitude of different components An Android application has no single point of entry, as we are used to having on a desktop operating system (e.g., in the form of Java's main() method). Instead, components of an Android application are started up or asked to perform a certain action by specific intents. What components our application is composed of and which intents these components react to are defined in the application's manifest file. The Android system uses this manifest file to get to know what our application is made of, such as the default activity to display when the application is started. NOTE We are only concerned about activities in this book, so we'll only discuss the relevant portions of the manifest file for this type of component. If you want to get your head dizzy, you can learn more about the manifest file on the Android Developers site. The version of our application as displayed and used on the Android Market The <...

Initialization Parameters in Android Manifestxml

As Chapter 3 explained, we told Android to launch Microjobs.java as the first Activity for MJAndroid. We defined that on the Application tab of the AndroidManifest.xml editor. The first part of the XML code that results from that choice is shown here < xml version 1.0 encoding utf-8 > android versionName 1.0> < uses-permission > < uses-permission android name > < uses-permission > < uses-permission > < uses-permission > application < uses-library > This is an integer that should always increment with each new version of the application. Every application should include a version code, and it should always be a monotonically increasing integer from version to version. This lets other programs (such as Android Market, installers, and launchers) easily figure out which is the latest version of an application. The filename of your .apk file should include this same version number, so it is obvious which version it contains. android versionName generally the...

Core Files and Directories of the Android Application

Every Android application has a set of core files that are created and are used to define the functionality of the application (see Table 3.1).The following files are created by default with a new Android application. Figure 3.8 Configuring My First Android App using the Android Project Wizard. Figure 3.8 Configuring My First Android App using the Android Project Wizard.

Resources for Developing Android Apps

Android apps are generally programmed in Java. Unlike the iPhone, anyone can download the Android SDK for free, and you can do your development from any computer you'd like. Google has been putting quite a bit of effort into recruiting Android programmers and has an extensive documentation available. In order to offer items in the Android Market, you must pay a 25 registration fee. If you want to charge for your apps through the Android Market, you must have a merchant account with Google Checkout, which means you'll need to supply bank information and a tax ID number. Probably the most significant recent change in app development is Google App Inventor (http appinventor.googlelabs.com). Google App Inventor allows non-programmers to create genuine Android apps by using a visual block-based programming interface based on MIT's OpenBlocks Java library. It's similar to the children's programming language Scratch. While App Inventor seems to do for Android development what WYSIWYG (what...

Exploring the Structure of an Android Application

Although the size and complexity of Android applications can vary greatly, their structures will be similar. Figure 2-7 shows the structure of the Hello World app you just built. CI AndroidManifest.xml Android applications have some artifacts that are required and some that are optional. Table 2-1 summarizes the elements of an Android application. (Note that Android 1.5 adds a few elements see Chapter 12 for details.) Table 2-1. The Artifacts of an Android Application AndroidManifest.xml The Android application descriptor file. This file defines the Yes activities, content providers, services, and intent receivers of the application. You can also use this file to declaratively define permissions required by the application, as well as grant specific permissions to other applications using the services of the application. Moreover, the file can contain instrumentation detail that you can use to test the application or another application. As you can see from Table 2-1, an Android...

Is an Android App Right for Your Company

I would argue that most companies should create an Android app to either promote their brand or extend existing services to their customers. However, this advice comes with a caveat The company must have the resources and the wherewithal to keep the app relevant and significant in the eyes of its customers. Using Android as a branding tool has had mixed results for a number of companies as they have launched their apps. Using the app as a customer acquisition tool has seen limited success. Using the app as a way to reinforce a brand has seen better results. It takes some clever thinking to identify ways to make an app relevant for a brand, which is a crucial part of an app's success. Your company must produce an app that goes beyond the simple store locator functionality that many apps provide. For example, a company selling paint might devise a color palette that shows pictures of rooms and walls with any paint color the user selects. The paint samples could include an entire...

Pricing Your Android

A key aspect of marketing your Android app is to carefully set your price. Setting your price is not a trivial matter. Part III of this book walks you through pricing considerations and helps you understand the buyer's mentality and decision-making process. You'll learn how to create promotions and cross-sell your app where possible another important aspect of pricing. The following chapters are included in Part III Perhaps one of the biggest challenges of developing an Android app is pricing. In this chapter you'll learn how and where to begin to price your app for maximum success. Chapter 13 Breaking into the Android Market Top Paid Apps You can do a number of things in an effort to get your app into the top tier of sales. Learn the best tips to reach maximum success on the Android Market. Learn the pros and cons to creating a free version of your app to expand your sales. Free apps with a paid app are the trend of the future for Android applications. Promotions aren't just for your...

Android Application Framework

The Android application framework provides everything necessary to implement your average application.The Android application lifecycle involves the following key components Android applications can interact with the operating system and underlying hardware using a collection of managers. Each manager is responsible for keeping the state of some underlying system service. For example, there is a LocationManager that facilitates interaction with the location-based services available on the handset. The viewManager and WindowManager manage user interface fundamentals.

Running and Debugging Android Applications

Now that you've set up your devices and AVDs, you can finally run the Hello World application. You can easily do this in Eclipse by right-clicking the hello world project in the Package Explorer view, and then selecting Run As > Android Application (or you can 2. Create a new Run configuration for the Android project if one does not already exist. (We'll have a look into Run configurations in a minute.) The emulator is missing some applications, such as the Android Market. Sometimes when we run an Android application, the automatic emulator device selection performed by the ADT plug-in is a hindrance. For example, we might have multiple devices emulators connected, and want to test our application on a specific device emulator. To deal with this, we can turn off the automatic device emulator selection in the Run configuration of the Android project. So, what is a Run configuration A Run configuration provides a way to tell Eclipse how it should start your application when you tell...

Installing Android applications

Use Application Installer to install Android applications (.apk) that are on your PC to the phone. Important The Unknown sources check box in Settings needs to be selected to be able install Android applications from the PC. To check, press HOME > MENU, and then tap Settings > Applications.

Launching Android Applications on a Handset

Double-click one of the running Android devices. There should be one listed for each handset plugged into the machine, in addition to one for each emulator instance running. If you do not see the handset listed, check your cables and make sure you installed the appropriate drivers, as explained in Appendix A. Eclipse now installs the Android application on the handset, attaches a debugger, and runs the application. Your handset now shows a screen very similar to the one you saw in the emulator. If you look at the DDMS perspective in Eclipse, you see that logging information is available, and many features of the DDMS perspective work with real handsets as well as the emulator.

The Android Application Life Cycle

Unlike most traditional environments, Android applications have limited control over their own life cycles. Instead, application components must listen for changes in the application state and react accordingly, taking particular care to be prepared for untimely termination. By default, each Android application runs in its own process, each of which is running a separate instance of Dalvik. Memory and process management is handled exclusively by the run time.

An Android application

This section presents a simple Android application demonstrating a single Activity, with one View. The Activity collects data, a street address to be specific, and creates an Intent to find this address. The Intent is ultimately dispatched to Google Maps. Figure 1.8 is a screen shot of the application running on the emulator. The name of the application is Where Do You Live. Figure 1.8 This Android application demonstrates a simple Activity and Intent. Figure 1.8 This Android application demonstrates a simple Activity and Intent. As previously introduced, the AndroidManifest.xml file contains the descriptors for the high-level classes of the application. This application contains a single Activity named AWhereDoYouLive. The application's AndroidManifest.xml file is shown in listing 1.6. Listing 1.6 AndroidManifest.xml for the Where Do You Live application < manifest < application This concludes our first Android application. This chapter has introduced the Android platform and...

Android Application Overview

An Android application consists of various functionalities. Some examples are editing a note, playing a music file, ringing an alarm, or opening a phone contact. These functionalities can be classified into four different Android components, shown in Table 2.1, each of which is specified by a Java base class. Table 2.1 The Four Possible Components of an Android Application

Content Providers Developing Android Applications

Google has led the pack, developing Android applications, many of which, such as the email client and web browser, are core features of the platform. OHA members are also working on Android application integration. eBay, for example, is working on integration with its online auctions. The first ADC received 1,788 submissions, with the second ADC being voted upon by 26,000 Android users to pick a final 200 applications that would be judged professionally all newly developed Android games, productivity helpers, and a slew of location-based services (LBS) applications.We also saw humanitarian, social networking, and mash-up apps. Many of these applications have debuted with users through the Android Market Google's software distribution mechanism for Android. For now, these challenges are over.The results, though, are still impressive. For those working on the Android platform from the beginning, handsets couldn't come fast enough.The T-Mobile G1 was the first commercial Android device...

Understanding the Anatomy of an Android Application

Classical computer science classes often define a program in terms of functionality and data, and Android applications are no different. They perform tasks, display information to the screen, and act upon data from a variety of sources. Developing Android applications for mobile devices with limited resources requires a thorough understanding of the application lifecycle. Android also uses its own terminology for these application building blocks terms such as Context, Activity, and intent.This chapter familiarizes you with the most important components of Android applications.

Designing and Developing Bulletproof Android Applications 571

Leveraging Third-Party Standards for Android Application Design 576 Leveraging Android Tools for Application Design 578 Avoiding Silly Mistakes in Android Application Design 578 Handling Defects Occurring on a Single Device 582 Leveraging Android Tools for Development 583 Avoiding Silly Mistakes in Android Application Development 583 Summary 583

Bringing It All Together Creating Your First Android Application

There are two ways to create an Android application using the tools we've discussed thus far. One is to create the application by issuing commands in a terminal or command window, another is to create the application from within the IDE, Eclipse. This section discusses creating the application using both methods. First, from the command window and then from Eclipse. The complex android script is used for creating many Android-related items, including new projects (as shown here) and Android virtual devices. The -a HelloAndroidGeek specifies the name of the derived activity class for the project. The -k com.samples.HelloAndroidGeek specifies the project's package name. The -t 2 specifies the Target ID of the new project, 2 being the Target ID for an Android version 1.5 program. You can see more about these Target IDs by entering the command, android list targets. Finally, the -p specifies the directory to create all of the project's subdirectories and files in. This creates the...

Android Development Tools

The Android SDK includes several tools and utilities to help you create, test, and debug your projects. reviewing what's available. For more detail than is included here, check out the Android documentation > The Android SDK and Virtual Device Manager Used to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touchscreens and GPS). > The Android Emulator An implementation of the Android virtual machine designed to run within a virtual device on your development computer. Use the emulator to test and debug your Android applications. > Android Debug Bridge (ADB) A client-server application that provides a link to a running emulator. It lets you copy files, install compiled application packages (.apk), and run shell commands. > Traceview A graphical...

Developing Native Android Apps

In this chapter, we take a look at developing native Android applications. Native Android applications are applications that run within the Android runtime on an Android handset. Let's look at what you need to get started developing native Android applications. Developing Android Applications Introduction to Android SDK Tools Developing Android Applications Introduction to Android SDK Tools

Understanding the Android SDK License Agreement

Before you can download the Android SDK, you must review and agree to the Android SDK License Agreement. This agreement is a contract between you (the developer) and Google (copyright holder of the Android SDK). 1. Rights granted Google (as the copyright holder of Android) grants you a limited, worldwide, royalty-free, non-assignable, and non-exclusive license to use the SDK solely to develop applications for the Android platform. Google (and third-party contributors) are granting you license, but they still hold all copyrights and intellectual property rights to the material. Using the Android SDK does not grant you permission to use any Google brands, logos, or trade names.You will not remove any of the copyright notices therein.Third-party applications that your applications interact with (other Android apps) are subject to separate terms and fall outside this agreement. 2. SDK usage You may only develop Android applications.You may not make derivative works from the SDK or...

Booting Android development

This section jumps right into the fray of Android development to focus on an important component of the Android platform, then expands to take a broader view of how Android applications are constructed. An important and recurring theme of Android development is the Intent. An Intent in Android describes what you want to do. This may look like I want to look up a contact record, or Please launch this website, or Show the Order Confirmation Screen. Intents are important because they not only facilitate navigation in an innovative way as discussed next, but they also represent the most important aspect of Android coding. Understand the Intent, understand Android. The next section provides foundational information about why Intents are important, then describes how Intents work. Beyond the introduction of the Intent, the remainder of this chapter describes the major elements of Android application development leading up to and including the first complete application.

Developing Android Applications

You can develop Android applications wit h the same high-quality tools you use to develop Java applications. The Android core libraries provide the functionality needed to build some amazingly rich mobile applications, and the Android development tools make running, debugging, and testing your applications a snap. This section explains the ins and outs of developing Android applications. It outlines the philosophy behind the system and then describes each of the key subsystems in detail. After reading this section, you'll have the knowledge and confidence to begin writing that real-world Android app you have in mind. Before reading this section you should read the Getting Started Guide, which helps you get up and running with the Android SDK and shows you how to build a basic app. This section builds on the information in the Getting Started section. Explains how to construct and interact with user interfaces for Android applications. After reading this page you'll have a solid...

Downloading the Android SDK

The Android SDK is easily accessible from the http code.google.com android page. From the development home page, click the Download the SDK link under Getting Started. After you agree to the terms of the Android SDK License Agreement, you will see the Download the Android SDK page. The Android SDK is downloaded in a 79MB (for Windows) package and it should download fairly quickly. Click the package name for your operating system to begin the download. There is no setup or installation process to speak of for the Android SDK rather, you must follow a series of steps to associate the SDK with your Eclipse development environment. The first of these steps is to obtain the Android plugin for Eclipse, after which you will configure it. The first step in setting up the Android SDK within the Eclipse development environment is to download and install the Android plugin for Eclipse. Both tasks of downloading and installing the plugin can be performed at the same time, and are relatively easy...

Android Devices That Arent Phones

The Alex is a simple eBook reader with an E-ink screen on top and an Android touchscreen on the bottom. E-ink is the patented display technology behind the Amazon Kindle and many other eBook readers. It's a form of electronic paper that looks great in full sunlight and requires low power usage. This device uses Wi-Fi to download books, but it can also run built-in Android apps. This would be a good choice for people familiar with Android on their phone or people who want to give Android a whirl without committing to a phone plan. The Barnes & Noble Nook also runs on Android, but it is heavily modified.

What Makes An Android Application

Android applications consist of loosely coupled components, bound by an application manifest that describes each component and how they all interact, as well as the application metadata including its hardware and platform requirements. > Content Providers Shareable data stores. Content Providers are used to manage and share application databases. They're the preferred means of sharing data across application boundaries. This means that you can configure your own Content Providers to permit access from other applications and use Content Providers exposed by others to access their stored data. Android devices include several native Content Providers that expose useful databases like the media store and contact details. You'll learn how to create and use Content Providers in Chapter 7.

Adding Logging Support to Your Android Application

Before you start diving into the various features of the Android SDK, you should familiarize yourself with logging, a valuable resource for debugging and learning Android. Android logging features are in the Log class of the android.util package. import android.util.Log

The Android Debug Bridge ADB

The Android debug bridge (ADB) is a client-service application that lets you connect with an Android Emulator or device. It's made up of three components a daemon running on the emulator, a service that runs on your development hardware, and client applications (like the DDMS) that communicate with the daemon through the service.

Editing Android Manifestxml

Take a look at the following AndroidManifest.xml file for the FindAFriend project. You need to add several Intent Filters for new Activities, including ones to edit a friend's location, edit a friend's name, and launch your Google Map. The full AndroidManifest.xml file should appear as follows < manifest < application < uses-permission

Enforcing Permissions in Android Manifestxml

High-level permissions restricting access to entire components of the system or application can be applied through your AndroidManifest.xml. All that this requires is including an android permission attribute on the desired component, naming the permission that will be used to control access to it.

Reading the Android SDK Documentation

A local copy of the Android documentation is provided in the docs subfolder on disk (as shown in Figure 2.3). The Home tab is your general starting point within the Android documentation. Here you find developer announcements and important links to the latest hot topics in Android development. The SDK tab provides information about the different Android SDK versions available, as well as information about the Android Native Development Kit (NDK).You find the Android SDK release notes here as well. Figure 2.3 The Android SDK documentation. Figure 2.3 The Android SDK documentation. The Dev Guide tab introduces the Android platform and covers best practices for Android application design and development, as well as information about publishing applications. The Reference tab provides a drill-down listing of the Android APIs with detailed coverage of specific classes and interfaces. The Resources tab provides access to Android technical articles and tutorials. Here you also find links to...

Android Developer Toolbox

If you've read Getting Started and Developing Apps, then you know how to build an Android application. (If you haven't read those sections you should now.) A manifesto explaining a technical philosophy and perspective that Android developers will find useful. By reading this page, you'll learn how to write applications that perform well on embedded devices (such as phone handsets), and that play nicely with other parts of the system. Describes how to use the APIs for accessing Google services that are installed on many Android devices.

Android 15 is a basic Android platform Do you wish to create a custom hardware profile [no

If you want to set custom hardware emulation options for the AVD, enter yes and set values as needed. If you want to use the default hardware emulation options for the AVD, just press the return key (the default is no). The android tool creates the AVD with name and system image mapping you requested, with the options you specified. If you are creating an AVD whose target is an SDK add-on, the android tool does not allow you to set hardware emulation options. It assumes that the provider of the add-on has set emulation options appropriately for the device that the add-on is modeling, and so prevents you from resetting the options.

Android Software Development Kit SDK

The Android SDK is a set of tools and libraries for creating native Android applications. The Android SDK also includes an emulator that enables you to test your Android application before deploying it to an actual Android handset. You can download the Android SDK from http code.google.com Android download.html.

Configuring the Android Emulator for GTalk

Before you can begin coding this project, you need to adjust a development setting on the Android Emulator, XMPP Settings. With the project open, you need to depart from your routine for a minute. If you are familiar with GTalk, you are aware that you can use the product only when you log into your Google account. Therefore, you must take an extra step now to ensure that your device (in this case, the Android Emulator) can log into your Google account, thus enabling you to send and receive messages. After you input your Username and Password, click Sign In. The Android Emulator should now attempt to authenticate your information. While the Emulator attempts to authenticate your information, it shows an Authenticating message.

Official Download Link Appportunity

Appportunity will be instantly available for you to download right after your purchase. No shipping fees, no delays, no waiting to get started.

Download Now