2. 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
application.
Used in Mobile Technology through its innovation module
of The Android Software Development Kit (SDK).
4. 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
5. 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
and more.
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.
6. • Helps in creating Open Sourced Mobile Applications.
Communication Application
Business Application
Multimedia Application
Internet Application
Fun/Entertainment Application
Gaming Application
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.
7. 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)
Plugin.
8. 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.
9. HOW TO CREATE A NEW PROJECT?
XML DESIGNING
EMULATOR
DEBUGGING THE APPLICATION
FOLDERS IN ANDROID APPLICATION
CANVAS CLASS FOR GAMING
GOOGLE PLAY (ANDROID MARKET)
DEPLOYING
10.
11.
12.
13.
14. ADDITIONAL INFORMATION
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.
15. ADDITIONAL INFORMATION
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.
16.
17. The Padding, style
and background
colour of the icon
can also be
changed. There
are various icons
in the Clipart
which can be
chosen according
to one’s
convenience. One
can switch on to
text instead of any
image as an icon.
18.
19.
20.
21. XML DESIGNING
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
convenience.
22.
23.
24. 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
value.
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.
25. UNDERSTANDING SYNTAXES
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
context.
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.
26. UNDERSTANDING SYNTAXES
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.
27. VIEWS AND LAYOUT
MANAGER
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
and behavior.
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
the performance.
28. ITEMS WHICH CAN BE DRAGGED AND
DROPPED IN THE UI VIEW OF .XML FILE
Form Widgets : Buttons, Checkbox, Radio Buttons,
Spinner etc.
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
etc.
Others : Text Clock.
29.
30.
31. EMULATOR
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
physical device.
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
development environment.
35. DEBUGGING
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
content, etc.
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.
37. FOLDER STRUCTURE OF ANDROID
APPLICATION
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.
38. MANIFEST FILE
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
requires.
It lists the libraries that the application must be linked against.
39. 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.
40. CANVAS API
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.
41. 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
applications.
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.
42. 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.