Wednesday, 29 October 2014

Android Installation

Android Installation is a very simple but length. We need to download android SDK development kit. The Android software development kit (SDK) includes everything you need to start developing, testing, and debugging Android applications.
The Android APIs
Development Tools
The Android Emulator
Full Documentation
Sample Code 
Online Support
 
Before starting android application lets get to know about development of android.

Development of Android


The Android SDK includes all the tools and APIs you need to write compelling and powerful mobile applications. The biggest challenge with Android, as with any new development toolkit, is learning the features and limitations of its APIs.
If you have experience in Java development you’ll find that the techniques, syntax, and grammar you’ve been using will translate directly into Android, although some of the specific optimization techniques may seem counterintuitive.

If you don’t have experience with Java but have used other object-oriented languages (such as C#), you should find the transition straightforward. The power of Android comes from its APIs, not from Java, so being unfamiliar with all the Java-specific classes won’t be a big disadvantage.
Installing Android
  •  —What You Need to Begin
  •   —Because Android applications run within the Dalvik virtual machine, you can write them on any platform that supports the developer tools. This currently includes the following:
  •   —Microsoft Windows (XP or Vista)
  •   —Mac OS X 10.4.8 or later (Intel chips only)
  •   —Linux
  •   —To get started, you’ll need to download and install the following:
  •   —The Android SDK
  •   —Java Development Kit (JDK) 5 or 6
You can download the latest JDK from Sun at

Note; If you already have a JDK installed, make sure that it meets the version requirements listed above, and note that the Java runtime environment (JRE) is not sufficient.
Downloading and Installing the SDK

  

 Download  android-sdk_r10-windows.zip  file
  ZIP file containing the API libraries, developer tools, documentation, and several sample applications and API demos that highlight the use of particular API features. Install it by unzipping the SDK into a SDK in C drive.
 Downloading with eclipse

First Download Eclipse from  http://www.eclipse.org/downloads
Download  and Unzip this file in to your directory (C:\).

Double-click on the file c:\eclipse\eclipse.exe

Android Eclipse Plug-in (ADT)
If you choose to use the Eclipse IDE as your Android development environment you will have the opportunity to install and run a plug-in called Android Development Tools. ADT comes with a variety of powerful tools and extensions that will make creating, running and debugging your Android applications much easier and faster.


Start Eclipse, then select Help > Software Updates > Find and Install….

In the dialog that appears, select Search for new features to install and press Next.

Press New Remote Site.

In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/.

Press OK.

You should now see the new site added to the search list (and checked).

Press Finish.
 
 
In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.

Read the license agreement and then select Accept terms of the license agreement, if appropriate.

Press Next.

Press Finish.

The ADT plug-in is not signed; you can accept the installation anyway by pressing Install All.

Restart Eclipse.

After restart, update your Eclipse preferences to point to the SDK root directory :
Select
Window > Preferences… to open the Preferences panel.
Select
Android from the left panel.
For the SDK Location in the main panel, press
Browse... and find the SDK root directory.

Press Apply, then OK
How Create Android virtual Device (AVD) 

You need to define a device which can be used for emulation. Press the device manager button, press "New" and maintain the following. 

Add this information
Press "Create AVD". This will create the device. To test if you setup is correct, select your device and press "Start"
Your AVD started..
 


 

Android Basics

Android Introduction
Today's mobile market is flooded with android applications. Everyone can use and create android apps for free. In my recent research i observed that may people want to create apps in android and earn money through it. 
So i will teach all those who doesn't know anything about android development.
What is Android?
         A software platform and operating system for mobile devices
         Based on the Linux kernel
         Developed by Google and later the Open Handset Alliance (OHA)
         Allows writing managed code in the Java language
         Unveiling of the Android platform was announced on 5 November 2007 with the founding of OHA
So before i start teaching let me tell you about history of android

  •   Android is a software stack for mobile devices that includes an operating system, middleware and key applications.
  •   Android's mobile operating system is based on a modified version of the Linux kernel. Google and other members of the Open Handset Alliance collaborated on Android's development and release.
  •   Android, Inc. was founded in Palo Alto, California, United States in October, 2003 by Andy Rubin (co-founder of Danger),Rich Miner (co-founder of Wildfire Communications, Inc.), Nick Sears (once VP at T-Mobile),and Chris White (headed design and interface development at WebTV)


Let’s get some insight of android development.    
Agenda
  •  —  Introduction to Android and Java
  •       Android Architecture and OOP
  •   Android UI and Advance Java
  •   Android Graphics and Audio , Video
  •   Persistence in Android
  •   Network Awareness
  •   3D graphics in OpenGL and other views
  •   Widgets and the way ahead
  •   Live Project

What does Android run on?
  •       The first Android mobile handset, the T-Mobile G1, was released in the United States in October 2008.        By the end of 2009 over 20 Android compatible handsets had been launched or announced in more than 26 countries on 32 different carrier networks.
  •       Rather than being a mobile OS created for a single hardware implementation, Android is designed to support a large variety of hardware platforms, from WVGA phones with hard keyboards to QVGA devices with resistive touchscreens.
  •       Beyond that, with no licensing fees or proprietary software, the cost to handset manufacturers for providing Android handsets, and potentially other Android-powered devices, is comparatively low. Many people now expect that the advantages of Android as a platform for creating powerful applications will encourage device manufacturers to produce increasingly tailored hardware.

The Framework
  • —  Android applications are written using Java as a programming language but are executed using a custom virtual machine called Dalvik rather than a traditional Java VM.
  •      Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memory and process management to the Android run time, which stops and kills processes as necessary to manage resources.
  •       Dalvik and the Android run time sit on top of a Linux kernel that handles low-level hardware interaction including drivers and memory management, while a set of APIs provides access to all of the underlying services, features, and hardware.

What comes in the box? And Android software stack.
  •      The Android APIs
  •      Development Tools
  •       The Android Emulator
  •      Full Documentation
  •      Sample Cod
  Linux Kernel : Core services (including hardware drivers, process and memory management, security, network, and power management) are handled by a Linux 2.6 kernel.
  Libraries : Running on top of the kernel, Android includes various C/C++ core libraries such as libc and SSL, as well as:
    •              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 Android run time is the engine that powers your applications and, along with the libraries, forms the basis for the application framework
 Core Libraries  : The core Android libraries provide most of the functionality available in the core Java libraries as well as the Android-specific libraries.
  Dalvik Virtual Machine 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 using the same API libraries. The application layer runs within the Android run time using the classes and services made available from the application framework.

Darvik Virtual Machine
  •   —One of the key elements of Android is the Dalvik virtual machine. Rather than use a traditional Java virtual machine (VM) such as Java ME (Java Mobile Edition), 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.
  •   —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 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.