Thursday, 16 August 2012

Voice Search arrives in 13 new languages

“Norwegian restaurants in New York City.” I can type that phrase fast, but I can say it even faster—and when I’m on the go, speed is what I’m looking for. With Voice Search, you can speak into your phone to get search results quickly and easily. Voice Search is already available in 29 languages, and today, we're bringing support to 13 new languages for Android users—bringing the total to 42 languages and accents in 46 countries. In fact, 100 million new speakers can use Voice Search now, with the addition of:
  • Basque
  • Bulgarian
  • Catalan
  • European Portuguese
  • Finnish
  • Galician
  • Hungarian
  • Icelandic
  • Norwegian
  • Romanian
  • Serbian
  • Slovak
  • Swedish

Each new language usually requires that we initially collect hundreds of thousands of utterances from volunteers and, although we’ve been working on speech recognition for several years, adding these new languages led our engineers and scientists to tackle some unique challenges. While languages like Romanian follow predictable pronunciation rules, others, like Swedish, required that we recruit native speakers to provide us with the pronunciations for thousands of words. Our scientists then built a machine learning system based on that data to predict how all other Swedish words would be pronounced.

This update has already started to roll out, and will continue to do so over the course of the next week. How you get started with Google Voice Search depends on what kind of phone you have. If your phone runs Android 2.2 or later, and you see the microphone icon on the Google Search widget on your homescreen, all you have to do is tap the icon to start a voice-powered search. Otherwise, you can install the Voice Search app from Google Play. Note that you can only speak one language into the app at a time, and you may need to change your language settings to use one of these new languages.

As with other languages we’ve added, one of the major benefits to Google’s cloud-based model is that the more people use Voice Search, the more accurate it becomes.

Posted by Bertrand Damiba, Product Manager

Creating Your Own Spelling Checker Service

Posted by Satoshi Kataoka and Ken Wakasa of the Android text input engineering team



The Spelling Checker framework improves the text-input experience on Android by helping the user quickly identify and correct spelling errors. When an app uses the spelling checker framework, the user can see a red underline beneath misspelled or unrecognized words so that the user can correct mistakes instantly by choosing a suggestion from a dropdown list.



If you are an input method editor (IME) developer, the Spelling Checker framework gives you a great way to provide an even better experience for your users. You can add your own spelling checker service to your IME to provide consistent spelling error corrections from your own custom dictionary. Your spelling checker can recognize and suggest corrections for the vocabularies that are most important to your users, and if your language is not supported by the built-in spelling checker, you can provide a spelling checker for that language.



The Spelling Checker APIs let you create your own spelling checker service with minimal steps. The framework manages the interaction between your spelling checker service and a text input field. In this post we’ll give you an overview of how to implement a spelling checker service. For details, take a look at the Spelling Checker Framework API Guide.



1. Create a spelling checker service class



To create a spelling checker service, the first step is to create a spelling checker service class that extends android.service.textservice.SpellCheckerService.



For a working example of a spelling checker, you may want to take a look at the SampleSpellCheckerService class in the SpellChecker sample app, available from the Samples download package in the Android SDK.



2. Implement the required methods



Next, in your subclass of SpellCheckerService, implement the methods createSession() and onGetSuggestions(), as shown in the following code snippet:

@Override                                                                        
public Session createSession() {
return new AndroidSpellCheckerSession();
}

private static class AndroidSpellCheckerSession extends Session {
@Override
public SuggestionsInfo onGetSuggestions(TextInfo textInfo, int suggestionsLimit) {
SuggestionsInfo suggestionsInfo;
... // look up suggestions for TextInfo
return suggestionsInfo;
}
}


Note that the input argument textInfo of onGetSuggestions(TextInfo, int) contains a single word. The method returns suggestions for that word as a SuggestionsInfo object. The implementation of this method can access your custom dictionary and any utility classes for extracting and ranking suggestions.



For sentence-level checking, you can also implement onGetSuggestionsMultiple(), which accepts an array of TextInfo.



3. Register the spelling checker service in AndroidManifest.xml



In addition to implementing your subclass, you need to declare the spelling checker service in your manifest file. The declaration specifies the application, the service, and a metadata file that defines the Activity to use for controlling settings. Here’s an example:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.samplespellcheckerservice">
<application android:label="@string/app_name">
<service
android:label="@string/app_name"
android:name=".SampleSpellCheckerService"
android:permission="android.permission.BIND_TEXT_SERVICE">
<intent-filter>
<action
android:name="android.service.textservice.SpellCheckerService" />
</intent-filter>
<meta-data
android:name="android.view.textservice.scs"
android:resource="@xml/spellchecker" />
</service>
</application>
</manifest>


Notice that the service must request the permission android.permission.BIND_TEXT_SERVICE to ensure that only the system binds to the service.



4. Create a metadata XML resource file



Last, create a metadata file for your spelling checker to define the Activity to use for controlling spelling checker settings. The metadata file can also define subtypes for the spelling checker. Place the file in the location specified in the

element of the spelling checker declaration in the manifest file.



In the example below, the metadata file spellchecker.xml specifies the settings Activity as SpellCheckerSettingsActivity and includes subtypes to define the locales that the spelling checker can handle.

<spell-checker xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/spellchecker_name"
android:settingsactivity="com.example.SpellCheckerSettingsActivity" />
<subtype
android:label="@string/subtype_generic"
android:subtypeLocale="en" />
</spell-checker>


That’s it! Your spelling checker service is now available to client applications such as your IME.



Bonus points: Add batch processing of multiple sentences



For faster, more accurate spell-checking, Android 4.1 (Jelly Bean) introduces APIs that let clients pass multiple sentences to your spelling checker at once.



To support sentence-level checking for multiple sentences in a single call, just override and implement the method onGetSentenceSuggestionsMultiple(), as shown below.

private static class AndroidSpellCheckerSession extends Session {                 
@Override
public SentenceSuggestionsInfo[] onGetSentenceSuggestionsMultiple(
TextInfo[] textInfo, int suggestionsLimit) {
SentenceSuggestionsInfo[] sentenceSuggestionsInfos;
... // look up suggestions for each TextInfo
return sentenceSuggestionsInfos
}
}


In this case, textInfo is an array of TextInfo, each of which holds a sentence. The method returns lengths and offsets of suggestions for each sentence as a SentenceSuggestionsInfo object.



Documents and samples



If you’d like to learn more about how to use the spelling checker APIs, take a look at these documents and samples:

  • Spelling Checker Framework API Guide — a developer guide covering the Spelling Checker API for clients and services.

  • SampleSpellCheckerService sample app — helps you get started with your spelling checker service.

    • You can find the app at /samples/android-15/SpellChecker/SampleSpellCheckerService in the Samples download.


  • HelloSpellChecker sample app — a basic app that uses a spelling checker.

    • You can find the app at /samples/android-15/SpellChecker/HelloSpellChecker in the Samples download.


To learn how to download sample apps for the Android SDK, see Samples.



Join the discussion on

+Android Developers



Download And Installing Android ADT Plugin For Eclipse


Download And Installing Android ADT Plugin For Eclipse

Previous tutorial  Android SDK tools show you how to install android SDK tools and the Eclips IDE . Now I'm going to complete the steps. First I will show you how to download and install Android ADT Plugin For Eclipse, then how to update the Android ADT Plugin For Eclipse , and finally how to create avd .

Installing the ADT Plugin for Eclipse

Android Development Tools (ADT)

When Eclipse is launched, select Help ->  Install New Software  to install the Android Development Tools (ADT) plug-in for Eclipse.
Installing the ADT Plugin for Eclipse
ADT Plugin for Eclipse   

In the Install dialog that appears, specify https://dl-ssl.google.com/android/eclipse/ and press Enter. After a while, you will see the Developer Tools' item appear in the middle of the window . Expand it to reveal its content: Android DDMS, Android Development Tools, Android Hierarchy Viewer, and Android Traceview. 
Check all of them and click Next twice.

Installing the ADT Plugin
Installing the ADT Plugin
You will be asked to review and accept the  licenses. Check the “I accept the terms of the  license agreements” option and click Finish. Once the installation is completed, you will be asked to  restart Eclipse. Go ahead and restart Eclipse now. 

Installing the ADT Plugin
Installing the ADT Plugin
When Eclipse is restarted, you are asked to configure your Android SDK. As the  Android SDK has already been downloaded earlier In the previous tutorial Android SDK tools , check the “Use existing  SDKs” option and specify the directory where you  have installed the Android SDK. Click Next. 
After this step, you are asked to send your usage statistics to Google. Once you have selected your  choice, click Finish.

For more details about installing the ADT Plugin, go to
And carefully follow developer.android.com/sdk/eclipse-adt.html
the instructions for downloading and installing the ADT Plugin. 
If you have any problems downloading the ADT, check out Google’s help at

Updating the ADT Plugin for Eclipse

In most cases, you can update your ADT plug-in simply as follows:
1.   Navigate to Help -> Check for Updates.
2.   If there are any ADT updates available, they will be presented. Simply select them and choose Install.
Sometimes a plug-in upgrade may be so significant that the dynamic update mechanism can’t be used. In those cases you may have to remove the previous plug-in  completely before installing the newer version.
Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  

Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  

Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  

Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  

Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  

Updating the ADT Plugin for Eclipse
Updating the ADT Plugin for Eclipse  
      

Creating Android Virtual Devices (AVDs) for Use in the Android Emulator


Creating Android Virtual Devices (AVDs)

The Android emulator, included in the Android SDK, allows you to run Android apps in a simulated environment on your computer rather than on an actual Android device. Before running an app in the emulator, you must create an Android Virtual Device (AVD) which defines the characteristics of the device on which you want to test, including the screen size in pixels, the pixel density, the physical size of the screen, size of the SD card for data storage and more. If you want to test your apps for multiple Android devices, you can create separate AVDs that emulate each unique device. To do so, perform the following steps:
To create an AVD, From Eclipse select Window ->  AVD Manager to display the Android Virtual Device Manager window .

Creating Android Virtual Devices (AVDs)
Creating Android Virtual Devices (AVDs)  
 Click New… to display the Create new Android Virtual Device (AVD) window, then configure the optionsas shown and click Create AVD. 

Create new Android Virtual Device
Create new Android Virtual Device
Each AVD you create has many other options specified in its config.ini. You can modify this file as described at 
developer.android.com/guide/developing/devices/managing-avds.html
To more precisely match the hardware configuration of your device.
It is preferable to create a few AVDs with different API levels and hardware configurations so that your application can be tested on different versions of the Android OS. 
Once your ADV has been created, it is time to test it. Select the AVD that you want to test and click the Start… button. The Launch Options dialog will appear. If you have a small monitor, it is recommended that you check the “Scale display to real size” option so that you can set the emulator to a smaller size. Click the Launch button to start the emulator.

AVDs with different API levels
AVDs with different API levels 
Now all tools are ready and you will be able to learn how to write your first Android application!

Download & Installing Android SDK tools - Eclipse Tutorial


Android SDK tools and Eclipse Tutorial

In the previous tutorial we know To develop Android apps you need a Windows®, Linux or Mac OS X system  Android Developer Tools . Now I'm going to download and install Android SDK tools & eclipse tools that required for developing the first app with android.

Installing the Java Development Kit (JDK)

Android requires the Java Development Kit (JDK) version 5 or 6 (JDK 5 or JDK 6). We used JDK 6. To download the JDK for Linux or Windows, go to
You need only the JDK. Be sure to follow the installation instructions at
Recent versions of Mac OS X come with Java SE 6. Be sure to get the latest version by using the Apple menu feature to check for software updates.

Android SDK

Download android sdk

You can download the Android SDK tools from developer.android.com/sdk/index.html
Click the link for your platform. Windows, Mac OS X or Linux to download the SDK’s archive file. Once you’ve downloaded the archive, simply extract its contents to a directory of your choice on your computer. Google recommends that you download the  installer_r20.0.3-windows.exe http://dl.google.com/android/installer_r20.0.3-windows.exe file instead and use it to set up the tools for you automatically. The following steps walk you through the installation process using this approach.
Download android sdk
Download Android SDK

Installing the Android SDK Tools

When you have downloaded the installer_r20.0.3-windows.exe file, double-click it to start the installation of the Android tools. In the welcome screen of the Setup Wizard, click Next to continue If your computer does not have Java installed, you will see the error dialog shown in the picture .
Installing the Android SDK Tools
Installing the Android SDK Tools

  
Note : to avoid this error you must Installing the Java Development Kit (JDK) .
You will be asked to provide a destination folder to install the Android SDK tools. Enter a destination path  and click Next.

Installing the Android SDK Tools
Installing the Android SDK Tools
When the setup is done, check the “Start SDK Manager (to download system images, etc.)” option and click Finish. This will start the SDK Manager.
Note : to avoid any problem though installation runs the SDK Manger as administrator .

Installing the Android SDK Tools
Installing the Android SDK Tools

Configuring the Android SDK Manager


The Android SDK Manager manages the various versions of the Android SDK currently installed on your computer. When it is launched, you will see a list of items and whether or not they are currently installed on your computer. 
Android SDK Manager
Android SDK Manager

Check the relevant tools, documentation, and platforms you need for your project. Once you have selected the items you want, click the Install button to download them. Because it takes a while to download from Google’s server, it is a good idea to download only what you need immediately, and download the rest when you have more time.

NOTE  For a start, you should at least select the latest Android 4.0 SDK platform and the Extras. 

Each version of the Android OS is identified by an API level number. For example, Android 2.3.3 is level 10 (API 10), while Android 3.0 is level 11 (API 11), and so on. For each level, two platforms are available. For example, level 14 offers the following:
- SDK Platform
- Google APIs by Google Inc.

The key difference between the two is that the Google APIs platform contains additional APIs provided by Google (such as the Google Maps library). Therefore, if the application you are writing requires Google Maps, you need to create an AVD using the Google APIs platform .

You will be asked to choose the packages to install. Check the Accept All options and click Install.


Configuring the Android SDK Manager
Configuring the Android SDK Manager
The SDK Manager will proceed to download the packages that you have selected. The installation takes some time, so be patient. When all the packages are installed, you will be asked to restart the ADB (Android Debug Bridge). Click Yes.

Installing the Eclipse IDE 


Eclipse is the recommended integrated development environment (IDE) for Android development, though it’s possible to use other IDEs, text editors and command-line tools. To download the Eclipse IDE for Java Developers, go to www.eclipse.org/downloads/ .
This page will allow you to download the latest version of Eclipse and you will see the latest version. To use another version, click the Older Versions' link above the list of downloads. Select the appropriate version for your operating system (Windows, Mac or Linux). To install Eclipse, you simply extract the archive’s contents to your hard drive. 
On our Windows 7 system, we extracted the contents to C:\Eclipse. 

For more Eclipse installation information, see http://wiki.eclipse.org/FAQ_Where_do_I_get_and_install_Eclipse%3F
Note: when you download the example code from some site you need to configure Eclipse to use JDKX (x like 6 or 7) by performing the following steps:

1. Locate the Eclipse folder on your system and double click the Eclipse icon (eclipse.exe) to open Eclipse.
2. When the Workspace Launcher window appears, click OK.
3. Select Window > Preferences to display the Preferences window.
4. Expand the Java node and select the Compiler node. Under JDK Compliance, set Compiler compliance level to x.x(x.x like 1.6 or 1.7 etc ).
5. Close Eclipse.

 Continue to part 2 of tools that required for developing the first app with android .
Installing Android ADT Plugin For Eclipse

Wednesday, 15 August 2012

Build Your Own App With Android Developer Tools


Now that you know what Android is What is Android? and what its feature set contains,  Android Feature you are probably anxious to get your hands dirty and start writing some applications! 
,however Before Build your own app , All you need to start Build your own Android applications is a copy of these android tools Android SDK and the Java Development Kit (JDK). 
Unless you’re a masochist, you’ll probably want a Java integrated development environment (IDE) - Eclipse tools( app creation software) particularly well supported to make development a little bit less painful.

In this article I will focus on an overview about the required Android developer tools and SDKs . in the next article we will learn how to setup and use these tools Installing Android SDK tools.

For Android development, you can use Android development tools  on  Mac, a Windows PC, or a Linux machine. All the tools needed are free and can be downloaded from the Web. Most of the examples provided in this blog should work fine with the Android emulator. For this blog, I am using a Windows 7 computer to demonstrate all  the code samples. If you are using a Mac or Linux computer, the screenshots should look similar; some minor differences may be present, but you should be able to follow along without problems. 

Let us explore the Android development tools !

Android application development tools

JAVA JDK 

If your computer does not have the JDK installed, you should start by downloading it from oracle website . 
-  The Android SDK makes use of the Java SE Development Kit (JDK).
- jdk is the base tools for Android development tools

ANDROID SDK

The first and most important piece of software you need to know about it is the Android SDK. The Android Software Development Kit (SDK) contains the necessary tools to create, compile and package Android application. Most of these tools are command line based.

The Android SDK contains a debugger, libraries, an emulator, documentation, sample code, and tutorials.
- The Android SDK also provides an Android device emulator, so that Android applications can be tested without a real Android phone. 
- You can create Android virtual devices (AVD) via the Android SDK manger, which run in this emulator.
- The Android SDK contains the Android debug bridge (adb) tool which allows to connect to a virtual or real Android device.
For more details about the Android SDK and Android development tools download visit  this link   

Eclipse RESOURCE EDITORS

Eclips is the integrated development environment (IDE) for developing your Android applications. In the case of Android, the recommended IDE is Eclipse, a multi-language software development environment featuring an extensible plug-in system. 
For Android development, you should download the Eclipse IDE for Java EE Developers 

ADT - ANDROID DEVELOPMENT TOOLS

Google provides the Android Development Tools (ADT) to develop Android applications with Eclipse. ADT is a set of components (plug-ins) which extend the Eclipse IDE with Android development capabilities.
ADT contains all required functionalities to create, compile, debug and deploy Android applications from the Eclipse IDE. ADT also allows to create and start AVDs.

DALVIK VIRTUAL MACHINE

The Android system uses a special virtual machine, i.e. The Dalvik Virtual Machine to run Java based applications. Dalvik uses an own bytecode format which is different from Java bytecode.
Therefore you cannot directly run Java class files on Android, they need to get converted in the Dalvik bytecode format.

HOW TO DEVELOP ANDROID APPLICATIONS

To learn  How to build an android app . first let explore code . Android code is written using Java syntax, and the core Android libraries include most of the features from the core Java APIs. Before you can run your projects, you must translate them into Dalvik bytecode. As a result, you get the familiarity of Java syntax while your applications gain the advantage of running on a VM optimized for mobile devices.
- The Java source files are converted to Java class files by the Java compiler.
- The Android SDK contains a tool called dx which converts Java class files into a .Dex (Dalvik Executable) file. 
- All class files of one application are placed in one compressed .Dex file. During this conversion process redundant information in the class files are optimized in the .dex file. For example if the same String is found in different class files, the .dex file contains only once reference of this String. These dex files are therefore much smaller in size than the corresponding class files.
-  The .dex file and the resources of an Android project, e.g. the images and XML files, are packed into an .apk (Android Package) file. The program aapt (Android Asset Packaging Tool) performs this packaging.
The resulting .apk file contains all necessary data to run the Android application and can be deployed to an Android device via the adb tool. The Android Development Tools (ADT) perform these steps transparently to the user.
If you use the ADT tooling you press a button the whole Android application (.apk file) will be created and deployed.

Saturday, 11 August 2012

Best & Most Popular Android Devices For Developer


What are the best android devices for developers ?

Android Devices For developer is optional steps but some development process will not available in the emulator, so we need the android devices. So let explore the top popular android device category .

Many developers ask What is the best android devices fro developer, in terms of ease of development, debugging features , Samsung  or Htc or other !! ?
Before we discuss the android developer devices  let know more details about android devices that available in the market .

Android Devices in the Market .

Android device companies like htc, Samsung  provide us a different shapes and sizes of Android devices . Most popular android devices can be categorized  into the following:

-  Smartphones 
- Tablets
- E-reader devices
- Netbooks
- MP4 players
- Internet TVs

Most popular android devices in the market that run Android OS  is Samsung Galaxy S II, the Motorola Atrix 4G, and the HTC EVO 4G Smartphones, etc see the picture below.
top & most android devices
Samsung Galaxy S II


Another popular category of devices that manufacturers  are rushing out is the tablet . Tablets typically come in two sizes: seven inches and ten inches, measured diagonally. The images below show the  Samsung Galaxy Tab 10.1  and the Asus Eee Pad Transformer TF101, both 10.1-inch tablets. Both the Samsung Galaxy 10.1 and the Asus Eee Pad Transfer TF101 run on Android 3.

Tablets Android devices
Samsung Galaxy 10.1 and the Asus Eee Pad Transfer TF101


Besides Smartphones and tablets, Android is also beginning to appear in dedicated devices, such as e-book readers. The images below show the Barnes and Noble’s NOOK Color  and Amazon’s Kindle Fire , both of which are color e-book readers running the Android OS.

e-book readers Android devices
Noble’s NOOK Color & Amazon’s Kindle Fire
In addition to these popular mobile devices, Android is also slowly finding its way into your living room. People of Lava, a Swedish company, has developed an Android-based TV, called the Scandinavia Android TV see the image below.
 Scandinavia Android TV devices
 Scandinavia Android TV 


Google has also ventured into a proprietary smart TV platform based on Android and codeveloped with companies such as Intel, Sony, and Logitech. Figure 1-6 shows Sony’s Google TV.
Now google lunch android 4.xx , the Samsung Galaxy Nexus  is one of the devices running on Android 4.0.

 Samsung Galaxy Nexus android devices
 Samsung Galaxy Nexus android 

At the end of this article and In my opinion Nexus One or any phone that is using the Google experience meaning that the manufacturer did not put a custom user - interface on the phone , so I recommend this device for developer also check this link for more details.


Google Nexus 7 Tablet - 8GB 

Google Nexus 7 Tablet (16 GB) 



Best phone for developing Android software 





Friday, 10 August 2012

Android Architecture For System Application Software Stack


Android Software Stack & Native Application Architecture

NATIVE Android  APPLICATIONS 

Before diving into the Android architecture we begin with the native application then we will explore the Android architecture which called Android software stack . Android devices typically come with a suite of preinstalled applications like :- 
- An e-mail client
- An SMS management application
- A full PIM (personal information management) suite, including a calendar and contacts list
- A WebKit-based web browser
- A music player and picture gallery
- A camera and video recording application
- A calculator
- A home screen
- An alarm clock
Android devices also ship with the following proprietary Google mobile applications:
- The Google Play Store for downloading  third-party Android applications
- ‹A fully featured mobile Google Maps application, including Street View, driving directions, and turn-by-turn navigation, satellite views, and traffic conditions
- The Gmail email client
- The Google Talk instant-messaging client
- The YouTube video player
OEMs company can customize the user interface and the applications bundled with each Android device. Several OEMs have done this, including HTC with Sense, Motorola with MotoBlur, and Samsung with TouchWiz.
The look and feel of the user interface may vary, but your applications will function in the same way across all compatible Android devices.

Android Software Stack

The Android software stack is, put simply, a Linux kernel and a collection of C/C++ libraries exposed through an application framework that provides services for, and management of, the run time and applications. The Android software stack is composed of the elements shown in Figure .

Android architecture for system application - software stack
Android architecture 
Linux kernel — Core services (including hardware drivers, process and memory management, security, network, and power management) are handled by a Linux 2.6 kernel. 
The kernel also provides an abstraction layer between the hardware and the remainder of the android architecture stack.
  ‹ Libraries — Running on top of the kernel, Android includes various C/C++ core libraries such as libc and SSL, as well as the following:
- A media library for playback of audio and video media
- A surface manager to provide display management
  ‹ Graphics libraries that include SGL and OpenGL for 2D and 3D graphics
  ‹ SQLite for native database support
  ‹ SSL and WebKit for integrated web browser and Internet security
  ‹ Android run time — The run time is what makes an Android phone an Android phone rather than a mobile Linux implementation. Including the core libraries and the Dalvik VM, the Android run time is the engine that powers your applications and, along with the libraries, forms the basis for the application framework.
  ‹ Core libraries — Although most Android application development is written using the Java language, Dalvik is not a Java VM. The core Android libraries provide most of the functionality available in the core Java libraries, as well as the Android-specific libraries.
  ‹ Dalvik VM — Dalvik is a register-based Virtual Machine that’s been optimized to ensure that a device can run multiple instances efficiently. It relies on the Linux kernel for threading and low-level memory management.
  ‹ Application framework — The application framework provides the classes used to create Android applications. It also provides a generic abstraction for hardware access and manages the user interface and application resources.
  ‹ Application layer —  All applications, both native and third-party, are built on the application layer by means of the same API libraries. The application layer runs within the Android run time, using the classes and services made available from the application framework.

The Dalvik Virtual Machine

One of the key elements of  android architecture  is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, including security, threading, and process and memory management. It’s also possible to write C/C++  applications that run closer to the underlying Linux OS. Although you can  do this, in most cases there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. (but This Blog focuses exclusively on writing applications that run within Dalvik using the SDK; NDK development is not within the scope of this blog. If your inclinations run toward NDK development, exploring the Linux kernel  and C/C++ underbelly of Android, modifying Dalvik, or otherwise tinkering with things under the hood, check out the Android Internals Google Group .)

All Android hardware and system service access is managed using Dalvik as a middle tier. By using  a VM to host application execution, developers have an abstraction layer that ensures they should never have to worry about a particular hardware implementation.
The Dalvik VM executes Dalvik executable files, a format optimized to ensure minimal memory footprint. You create  .dex executables by transforming Java language compiled classes using the tools supplied within the SDK.
-   The android system uses a special virtual machine, Dalvik Virtual Machine to run Java based applications. 
- Dalvik uses an own bytecode format which is different from Java bytecode.
- You cannot directly run Java class files on Android, they need to get converted in the Dalvik bytecode format.

Android Application Architecture

we discuses  android application architecture  with more details in the following article : 

Android Libraries

Android architecture offers a number of APIs for developing your applications. Rather than list them all here, check out the documentation , which gives a complete list of packages included in the Android SDK.
Android and android architecture is intended to target a wide range of mobile hardware, so be aware that the suitability and implementation of some of the advanced or optional APIs may vary depending on the host device.