Está en la página 1de 22

What is Android?

Android is an Open Source and Linux-based Operating System for mobile


devices such as smartphones and tablet computers, notebooks etc.
Android was developed by Google and later the OHA(Open Handset Alliances)
and other companies.
OHA is a consortium of 84 companies such as Google, Samsung, ebay, intel,
synaptics etc. It was established on 5th November, 2007, led by Google.

Why Android ?
Features of Android
Feature Description

Open Source Android is an Open Source Operating


System. Anyone can customize the
Android Platform.

Beautiful UI Android OS basic screen provides a
beautiful user interface.

Connectivity GSM/EDGE, CDMA, UMTS, Bluetooth,


Wi-Fi.

Storage SQLite database is used for data


storage purposes.

Media support H.263, H.264, MPEG-4, AMR, AAC,


MP3, MIDI, WAV, JPEG, PNG, GIF, and
BMP etc.

Messaging SMS and MMS

Web browser

Multi-touch Android has support for multi-touch

Multi-tasking User can jump from one task to


another at same time. Various
applications can run simultaneously.

Resizable widgets Widgets are resizable, so users can


expand them to show more content or
shrink them to save space

Multi-Language Supports Many Languages.

GCM Google Cloud Messaging (GCM) is a


service that lets developers send short
message data to their users on
Android devices

Wi-Fi Direct A technology that lets apps pair


directly, over a high-bandwidth.

Android Beam A popular technology that lets users


instantly share, just by touching two
phones together.

Android Applications
Android applications are usually developed in the Java language using the
Android SDK(Software Development Kit).
Android powers hundreds of millions of mobile devices in more than 190
countries around the world. It's the largest installed base of any mobile
platform and growing fast. Every day more than 1 million new Android devices
are activated worldwide
Once developed, Android applications can be packaged easily and sold out
either through a store such as Google Play,Opera Mobile Store,and the
Amazon Appstore.

Categories of Android applications


There are many android applications in the market. The top categories are:
History of Android
1) Initially, Andy Rubin founded Android Incorporation in Palo Alto, California,
United States in October, 2003.

2) In 17th August 2005, Google acquired android Incorporation. Since then, it is


in the subsidiary of Google Incorporation.

3) The key employees of Android Incorporation are Andy Rubin, Rich Miner,
Chris White and Nick Sears.

4) Originally intended for camera but shifted to smart phones later because of
low market for camera only.

5) Android is the nick name of Andy Rubin given by co-workers because of his
love to robots.

In 2007, Google announces the development of android OS.The first beta


version of the Android Software Development Kit (SDK) was released by
Google in 2007 where as the first commercial version, Android 1.0, was
released in September 2008.In 2008, HTC launched the first android mobile.

On June 27, 2012, at the Google I/O conference, Google announced the 4.1
Jelly Bean. Jelly Bean is an incremental update, with the primary aim of
improving the user interface, both in terms of functionality and performance.

What is API level?


(Application Programming Interface)
API Level is an integer value that uniquely identifies the framework API revision
offered by a version of the Android platform.

The code names of android ranges from A to M currently, such as Aestro,


Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream
Sandwitch, Jelly Bean, KitKat, Lollipop and Marshmallow
Platform Version API Level VERSION_CODE
Android 8.1 27 Oreo
Android 8.0 26 Oreo
Android 7.1 25 Nougat
Android 7.0 24 Nougat
Android 6.0 23 MARSHMALLOW
Android 5.1 22 LOLLIPOP_MR1
Android 5.0 21 LOLLIPOP
KITKAT_WATCH
Android 4.4W 20
(KitKat for Wearables Only)
Android 4.4 19 KITKAT
Android 4.3 18 JELLY_BEAN_MR2
Android 4.2, 4.2.2 17 JELLY_BEAN_MR1
Android 4.1, 4.1.1 16 JELLY_BEAN
Android 4.0.3, 4.0.4 15 ICE_CREAM_SANDWICH_MR1
Android 4.0, 4.0.1, 4.0.2 14 ICE_CREAM_SANDWICH
Android 3.2, 3.3 13 HONEYCOMB_MR2
Android 3.1.x 12 HONEYCOMB_MR1
Android 3.0.x 11 HONEYCOMB
Android 2.3.4
10 GINGERBREAD_MR1
Android 2.3.3
Android 2.3.2

Android 2.3.1 9 GINGERBREAD

Android 2.3
Android 2.2.x 8 FROYO
Android 2.1.x 7 ECLAIR_MR1
Android 2.0.1 6 ECLAIR_0_1
Android 2.0 5 ECLAIR
Android 1.6 4 DONUT
Android 1.5 3 CUPCAKE
Android 1.1 2 BASE_1_1
Android 1.0 1 BASE
Architecture
Android operating system is a stack of software components which is roughly
divided into five sections and four main layers as shown below in the
architecture diagram.

Linux kernel
At the bottom of the layers is Linux. It is the heart of android architecture. This
provides a level of abstraction between the device hardware and it contains all
the essential hardware drivers like camera, keypad, display etc.

Libraries
On top of Linux kernel there is a set of libraries including open-source Web
browser engine WebKit, SQLite database which is a useful for storage and
sharing of application data, Media libraries to play and record audio and video,
FreeType for font support, SSL libraries responsible for Internet security etc.

Android Runtime
This is the third section of the architecture and available on the second layer
from the bottom. This section provides a key component called Dalvik Virtual
Machine which is a kind of Java Virtual Machine specially designed and
optimized for Android.

The Android runtime also provides a set of core libraries which enable to write
Android applications using standard Java programming language.

Application Framework
The Application Framework layer provides many higher-level services to
applications in the form of Java classes.

The Android framework includes the following key services −

 Activity Manager − Controls all aspects of the application lifecycle and


activity stack.
 Content Providers − Allows applications to publish and share data with
other applications.
 Resource Manager − Provides access to non-code embedded resources
such as strings, color settings and user interface layouts.
 Notifications Manager − Allows applications to display alerts and
notifications to the user.
 View System − An extensible set of views used to create application user
interfaces.

Applications
You will find all the Android application at the top layer. You will write your
application to be installed on this layer only. Examples of such applications are
Home, Settings, Contacts, Books, Browser, and Games etc.
Environment Setup
Android application development can be started on either of the following
operating systems

 Microsoft Windows XP or later version.


 Mac OS X 10.5.8 or later version with Intel chip.
 Linux including GNU C Library 2.7 or later.

All the required tools to develop Android applications are freely available and
can be downloaded from the Web.

 Java JDK5 or later version


 Android SDK
 Java Runtime Environment (JRE) 6
 Android Studio
 Eclipse IDE for Java Developers (optional)
 Android Development Tools (ADT) Eclipse Plug-in (optional)

Android IDEs
 Android Studio
 Eclipse IDE

There are 3 ways to install android


1. By ADT Bundle
2. By Setup Eclipse Manually
3. By Android Studio

ADT Bundle
It is the simplest technique to install required softwares for android application
development. It includes:

 Eclipse IDE
 Android SDK
 Eclipse Plugin

If you have downloaded the ADT bundle, unjar it, go to eclipse IDE and start
the eclipse by clicking on the eclipse icon.
Android Studio
As per Google official android development, they have launched android studio
as official Android IDE.

Set-up Java Development Kit (JDK)


set PATH=C:\jdk1.8.0_75\bin;%PATH%
set JAVA_HOME=C:\jdk1.8.0_75
Android - Studio

System Requirements
 Microsoft® Windows® 10/8/7/Vista/2003 (32 or 64-bit).
 Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
 Linux

Android Development Tools


All the required tools to develop Android applications are open source and can
be downloaded from the Web. Following is the list of softwares you will need

 Java JDK5 or later version


 Android Studio

Set-up Java Development Kit (JDK)

Download and install jdk setup.

set PATH=C:\Program Files\jdk1.8.0_75\bin;


set JAVA_HOME=C:\Program Files\jdk1.8.0_75;

Setup Android Studio


Overview
Android Studio is the official IDE for android application development.

Download and run Android Studio according to android studio wizard


guideline.

Installation
Launch Android Studio.exe, Make sure before launch Android Studio, Our
Machine should require installed Java JDK.

Once you launched Android Studio, its time to mention JDK5 path or later
version in android studio installer.
Check the components, which are required to create applications, below the
image have selected Android Studio, Android SDK, Android Virtual Machine
and performance(Intel chip).
Specify the path for Android studio and Android SDK

Specify the RAM space for Android emulator by default it would take 512MB of
RAM
At final stage, it would extract SDK packages, it would take a while time to
finish the task and would take 2626 MB of Hard disk space.

After done all above steps perfectly, you must get finish button and it gonna be
open android studio project with Welcome to android studio message as
shown below
Android Emulator
Android Emulator or Android Virtual Device is used to run, debug and test the
android application if you don't have the real device.

Create Android Virtual Device


Launch Android AVD Manager to create Android Virtual Device.

Dalvik Debug Monitoring Service (DDMS)


DDMS is used to monitor and control the Dlavik virtual machines on which we
are debugging our applications.
Dalvik Virtual Machine | DVM
The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for
mobile devices.

Dalvik is a name of a town in Iceland.

Let's see the compiling and packaging process from the source file:

The java compiler compiles the java source file into the class file.

The Dex compiler converts the class files into the .dex file that run on the
Dalvik VM. Multiple class files are converted into one dex file.

The Android Assets Packaging Tool (aapt) handles the packaging process.
Hello World Example

You can start your application development by calling Start a new Android
Studio project or by File -> New -> New Project ->

New installation frame should ask Application name, package information and
location of the project.
Specify Minimum SDK
Next, follow the instructions provided and keep all other entries as default till
the final step. Once your project is created successfully, you will have following
project screen:

Create Android Virtual Device


To test your Android applications, you will need a virtual Android device. So
before we start writing our code, let us create an Android virtual device.
Launch Android AVD Manager Clicking AVD Manager icon as shown below
After Click on a virtual device icon, it going to be shown by default virtual
devices which are present on your SDK, or else need to create a virtual device
by clicking Create new Virtual device button

Running the Application


Let's try to run our Hello World! application we just created. To run the app
from Android studio, open one of your project's activity files and click Run
icon from the toolbar.

The android emulator might take 2 or 3 minutes to boot. So please have


patience.

Android studio installs the app on your AVD and starts it and if everything is
fine with your setup and application, it will display following Emulator window

Set-up Android SDK


LaunchAndroid SDK Manager

Once you launched SDK manager, its time to install other required packages

También podría gustarte