WHAT IS ANDROID?
Google created software stack for creating comprehensive
Mobile Applications and Software to realize the full
potential of one’s Mobile handset and its possibilities.
Comprehensive software stack of mobile devices that
includes an operating system, middleware and key
Used in Mobile Technology through its innovation module
of The Android Software Development Kit (SDK).
More About Android
Company / developer : Google / Open Handset Alliance
Android Open Source Project
Programmed in : C, C++, Java
OS family : Unix-like
Initial release : September 23, 2008
Latest release : 4.2.2 Jelly Bean / February 11, 2013
Marketing target : Smartphones, Tablet computers
Package manager : Google Play, APK
Supported platforms : ARM, MIPS, x86, I.MX
Kernel type : Monolithic (modified Linux kernel)
License : Apache License 2.0
Linux kernel patches under GNU GPL
IMPACT ON TODAY’S MARKET
Android powers devices from some of the best handset and tablet
manufacturers in the world, like Samsung, HTC, Motorola, Sony, Asus
Flip-out keyboard or on-screen, from smartphone to tablet and at
every possible price point, there’s an Android device for everyone
making it the world's most widely used smartphone platform.
Android devices can be controlled with voice by Simply touching the
microphone on the keyboard and talking to write emails, SMS etc.
Text appears without any span of time.
• Helps in creating Open Sourced Mobile Applications.
Utility and Security Application
• Features like Face Unlock — which uses facial recognition to let you
unlock your device with a smile.
• Android Beam — which lets you share contacts, directions and more
by touching two devices together.
The Android software development kit (SDK) includes a
comprehensive set of development tools. These include a
debugger, libraries, a handset emulator based on QEMU,
documentation, sample code, and tutorials.
Development platforms include Linux, Mac OS X, Windows XP.
The officially supported integrated development environment
(IDE) is Eclipse using the Android Development Tools (ADT)
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.
The Android Development Tools (ADT) provides specialized
editors for resources files, e.g. layout files. These editors allow
to switch between the XML representation of the file and a
richer user interface via tabs on the bottom of the editor.
HOW TO CREATE A NEW PROJECT?
DEBUGGING THE APPLICATION
FOLDERS IN ANDROID APPLICATION
CANVAS CLASS FOR GAMING
GOOGLE PLAY (ANDROID MARKET)
Application Name : This name is used as the title of your application
launcher icon when it is installed on a device.
Project Name : This text is used as the name of the folder where your
project is created.
Package Name : This class package namespace creates the initial package
structure for your applications code files and is added as the
package attribute in your application's Android manifest file.
Minimum Required SDK : This setting indicates the lowest version of the
Android platform that your application supports. This value sets the min
SdkVersion attribute in the <uses-sdk> element of your manifest file.
Target SDK : This setting indicates the highest version of Android with
which you have tested with your application and sets the target SDK Version
attribute in your application's' manifest file.
Compile With API version : This setting specifies what version of the
SDK to compile your project against. It is strongly recommended to use the
most recent version of the API.
Theme : This setting specifies which standard Android visual style is
applied to your application.
Google Play requires that every Android application uses its own unique
package. Therefore, reverse domain name is used as package name. This
avoids collisions with other Android applications.
The Padding, style
colour of the icon
can also be
are various icons
in the Clipart
which can be
can switch on to
text instead of any
image as an icon.
The XML Designing can be done in two ways :
By Dragging, Dropping and Positioning items from the
Palette to its Graphical Layout (i.e. the UI view).
Through Coding in .xml window (basically the backend of
Graphical Layout) .
One can select AppTheme, UI mode, alter changes in
height, width, margins and gravity, switch from portrait
to landscape or vice versa according to his/her
DIFFERENT TYPES OF LAYOUTS
FrameLayout is a layout manager which draws all child elements on
top of each other. Which allows to create nice visual effects.
LinearLayout puts all its child elements into a single column or row
depending on the android:orientation attribute. Possible values for
this attribute are horizontal and vertical, horizontal is the default
LinearLayout supports assigning a weight to individual children via
the android:layout_weight layout parameter. This value specifies how
much of the extra space in the layout is allocated to the View.
RelativeLayout allow to position the widget relative to each other.
This allows for complex layouts. If you want to center a single
component., just add one component to the RelativeLayout and set
the android:layout_centerInParent attribute to true.
GridLayout was introduced with Android 4.0. This layout allows you
to organize a view into a Grid. GridLayout separates its drawing area
into: rows, columns, and cells.
The match_parent value tells the to maximize the widget in its parent. The
wrap_content value tells the layout to allocate the minimum amount so that
widget is rendered correctly.
The ScrollView class can be used to contain one View that might be to big too
fit on one screen. ScrollView will is this case display a scroll bar to scroll the
The android:fillViewport="true" attribute ensures that the scrollview is set to
the full screen even if the elements are smaller then one screen.
android:versionName and android:versionCode specify the version of your
application. versionName is what the user sees and can be any String and
versionCode must be an integer.
android:name="android.intent.category.LAUNCHER" defines that this
application is added to the application directory on the Android device.
The @string/app_name value refers to resource files which contain the actual
value of the application name.
The uses-sdk part of the AndroidManifest.xml file defines the minimal SDK
version for which your application is valid.
Various tags used in AndroidManifest.xml are manifest, uses-sdk, application,
activity, intent filter, action etc.
Other tags which basically promote designing are RelativeLayout, TextView,
EditText, Button etc.
VIEWS AND LAYOUT
Views are user interface widgets, e.g. buttons or text fields. Widgets
are interactive components which are primarily used on the Android
homescreen.The base class for all views is the android.view.View class.
Views have attributes which can be used to configure their appearance
A layout manager is responsible for arranging other views. The base
class for these layout managers is the android.view.ViewGroup class
which extends the View class.
Layout managers can be nestled to create complex layouts. You
should avoid nesting them too deeply as this has a negative impact on
ITEMS WHICH CAN BE DRAGGED AND
DROPPED IN THE UI VIEW OF .XML FILE
Form Widgets : Buttons, Checkbox, Radio Buttons,
Text Fields : Textboxes, Password Boxes, Number Boxes etc.
Layouts : Grid Layout, Linear Layouts, Frame Layout etc.
Composite : Tabs, List View, Scroll View, Search View etc.
Images And Media : Image Button, Video View, Gallery etc.
Time And Date : Time Picker, Date Picker, Calendar View etc.
Transitions : Image Switcher, Text Switcher, Stack View etc.
Advanced : Texture View, Surface View, Number Picker
Others : Text Clock.
The Android SDK includes a virtual mobile device emulator that runs on your computer.
The emulator lets you prototype, develop and test Android applications without using a
It runs a full Android system stack, down to the kernel level, that includes a set of
preinstalled applications (such as the dialer) that you can access from your applications.
You can choose what version of the Android system you want to run in the emulator by
configuring AVDs, and you can also customize the mobile device skin and key
mappings. When launching the emulator and at runtime, you can use a variety of
commands and options to control its behavior.
During development and testing of your application, you install and run your
application in the Android emulator. You can launch the emulator as a standalone
application from a command line, or you can run it from within your Eclipse
Debugging allows you to run a program interactively while watching the
source code and the variables during the execution.
By breakpoints in the source code you specify where the execution of the
program should stop. To stop the execution only if a field is read or modified,
you can specify watchpoints .
Breakpoints and watchpoints can be summarized as stop points.
Once the program is stopped you can investigate variables, change their
If you are developing in Eclipse with the ADT plugin, you can use the built-in
Java Debugger, along with DDMS, to debug your applications.
FOLDER STRUCTURE OF ANDROID
MANIFEST FILE :
xmlns:android Defines the Android namespace. This attribute should
always be set to "http://schemas.android.com/apk/res/android".
Every application must have an AndroidManifest.xml file (with
precisely that name) in its root directory.
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.
It determines which processes will host application components.
It declares which permissions the application must have in order to
access protected parts of the API and interact with other applications.
It also declares the permissions that others are required to have in
order to interact with the application's components.
It declares the minimum level of the Android API that the application
It lists the libraries that the application must be linked against.
RES AND GEN FOLDER
RES : Android supports that resources, like images and certain XML configuration
files, can be keep separate from the source code. These resources must be defined
in the res directory in a special folder dependent on their purpose. You can also
append additional qualifiers to the folder name to indicate that the related
resources should be used for special configurations, e.g. you can specify that a
resource is only valid for a certain screen size.
GEN : The gen directory in an Android project contains generated values. R.java is
a generated class which contains references to certain resources of the project. If
you create a new resource, the corresponding reference is automatically created in
R.java via the Eclipse ADT tools. These references are static integer values and
define IDs for the resources. The Android system provides methods to access the
corresponding resource via these IDs.
The Canvas API allows to create complex graphical effects.
The Canvas class provides the drawing methods to draw on a bitmap
and the Paint class specifies how you draw on the bitmap.
The Canvas class
The Canvas object contains the bitmap on which you draw.
Provides methods for drawing operations, e.g. drawARGB() for
drawing a color, drawBitmap() to draw a Bitmap, drawText() to draw
a text, drawRoundRect() to draw a rectangle with rounded corners
and much more.
The Paint Class : The Paint class allows to specify the color, font and
certain effects for the drawing operation.
GOOGLE PLAY (ANDROID MARKET)
Google offers the Google Play service in which programmers can offer their
Android application to Android users.
Google phones include the Google Play application which allows to install
Google Play also offers an update service, e.g. if a programmer uploads a
new version of his application to Google Play, this service will notify existing
users that an update is available and allow to install it.
Google Play used to be called Android Market.
DEPLOYING AN APP
Before you can deploy an app, you must verify your domain.
Open the Marketplace page at (www.google.com/appsmarketplace) for the
app you want to deploy.
In the upper-right corner, click Add it now.
Enter your Google Apps domain name and click on Go.
Sign in to the Google Admin console.
The Admin console for your Google Apps domain appears, and you are
presented with the terms of service. Read it, then click I agree. Continue.
If the app requires access to Google APIs, those APIs are listed here. To give
the app access to the necessary APIs, click Grant data access.
Click Enable app now or Enable app later.
After you add your first app from the Marketplace, it can take up to 24 hours
for user cookies to refresh and for that app to appear in the more menu in
the universal navigation bar.