Android code , Android Phone, Android Developers

Android code , Android Phone, Android Developers and New Google Android Technologies

Android Tools

Posted by admin June - 11 - 2010 - Friday ADD COMMENTS

The Android SDK supplies developers with a number of powerful and useful tools. Throughout this book, you will use only a handful of them directly. This section takes a quick look at just a few of these tools, which will be covered in much more depth in the following chapters, as you dive into command-line development.

NOTE

For more detailed information about the other tools included in the Android SDK, consult the Android doc files.

Emulator.exe

Arguably one of the most important tools included in the Android SDK is emulator.exe. emulator.exe launches the Android Emulator. The Android Emulator is used to run your applications in a pseudo-Android environment. Given that, as of the writing of this book, there were no hardware devices yet released for the Android platform, emulator.exe is going to be your only means to test applications on a “native” platform.

You can run emulator.exe from the command line or execute it from within Eclipse.  However, in the interest of giving you all the information you need to program with the Android SDK outside of Eclipse, Chapter 6 covers command-line usage of emulator.exe when you create your Hello World! applications.

When using the Android Emulator to test your applications, you have two choices for navigating the user interface. First, the emulator comes with usable buttons, as shown in Figure 4-1. You can use these buttons to navigate Android and any applications that you develop for the platform.

TIP

The Power On/Off, Volume Up, and Volume Down buttons are slightly hidden to the sides of the virtual device. They identify themselves when you hover the mouse pointer over them.Given that many higher-end phones now include a touch screen, the second input choice you have when using the emulator is a simulated touch screen. You use your mouse as a stylus. The objects on the emulator’s screen can be interacted with using the mouse.

adb.exe

Another tool that will become very useful to you when you are using command-line programming is Android Debug Bridge or adb (adb.exe). This tool allows you to issue commands to the Emulator.exe tool.

When you are working in a command-line environment, the adb tool allows you to do the following:

● Start and stop the server

● Install and uninstall applications

● Move files to and from the emulator

MKSDCARD.exe

MKSDCARD.exe is a very useful tool if you are testing an application that will need to read or write files to or from an SD Memory Card inserted into the mobile device. MKSDCARD.exe creates a small partition drive on your drive that will hold and retain the test files. The emulator will treat this partition like an SD Memory Card.

DX.exe

DX.exe is the compiler of the Android SDK. When run against your Java files, DX.exe will create files with .dex extensions—Dalvik executable format. These files are in the correct format to be understood by, and run on, an Android device.

NOTE

Android executable files are called Dalvik executable files as a reference to the Dalvik virtual machine that Android used to run all applications. The Dalvik virtual machine runs each application in its own thread with the same priority as core Android applications.

Android Documentation

Posted by admin May - 19 - 2010 - Wednesday ADD COMMENTS

The Android documentation is located in the Docs folder within the Android SDK at ../%sdk folder%/DOCS. The documentation that is supplied with the SDK includes steps on downloading and installing the SDK, “Getting Started” quick steps for developing applications, and package definitions. The documentation is in HTML format and can be accessed though the documentation.html file in the root of the SDK folder. The following illustration depicts the main page of the Android SDK documentation.  You can navigate to all of the documentation that is included in the Android SDK by using the links within documentation.html.

CAUTION
As you are navigating the Android SDK, you may think some pages are mislinked or missing, because the right side of the screen may be blank when you click some links. However, if you scroll down you will see that the pages are just misaligned. In working with the Android SDK, we have found that there are sections of the documentation that we refer to more than others. For me, the most valuable segments of the Android SDK documentation are as follows (as they appear in the navigation bar):
● Reference Information
● Class Index
● List of Permissions
● List of Resource Types
● FAQs
● Troubleshooting

The Troubleshooting subsection of the documentation will be especially helpful as you are starting out. As you progress through the book and begin to develop your own Android applications, you will find that the Reference Information section of the documentation is more helpful. For example, while it would have little to no use to you now, the List of Permissions subsection will be very helpful to you when you progress to
the section of the book that deals with creating more complex applications. Take some time to familiarize yourself with the Android SDK documentation and the hundreds of documents that have been provided for you.

What Is in the Android SDK?

Posted by admin May - 10 - 2010 - Monday ADD COMMENTS

The Android SDK is downloaded in a simple zipped package The bulk of the Android SDK, in number of files, consists of documentation, with programming APIs, tools, and samples comprising the rest. This section provides a closer look at exactly what is included in the Android SDK.
extract the Android SDK to the Program Files folder, so that it would be easier to track. If you are having trouble finding the SDK because you used the default extraction setting, it should be in the following folder: /%downloadfolder%/android-sdk_m5-rc14_windows/android-sdk_m5-rc14_windows.

Navigate to the folder where you unpacked the Android SDK so that you can begin to explore the folder structure within. While there are a few files in the root folder, like android.jar (a compiled Java application containing the core SDK libraries and APIs) and some release notes, the remainder of the Android SDK is divided into three main folders:  Docs Contains all of the accompanying Android documentation

NOTE
Much of the documentation found in the Docs folder can also be found on the http://code.google.com/android Android development site.
● Samples Contains six sample applications that you can compile and test from within Eclipse
● Tools Contains all of the development, compilation, and debugging tools that you need throughout the development process of an Android application

The following sections discuss in a bit more detail what is included in each of the SDK folders. Each API demo is compiled and run to illustrate the capabilities of Android. Many of the tools are discussed and demonstrated in later chapters as you learn how to create and compile applications using the command-line options of Microsoft Windows and Linux.