The document provides an overview of Android including:
1) Android is an open source operating system based on Linux that allows apps to be written in Java and run on the Dalvik Virtual Machine.
2) The history of Android including its founding by Andy Rubin and acquisition by Google.
3) Key Android concepts are introduced like activities, services, broadcast receivers, content providers, and the application framework.
4) Integrated development environments like Eclipse and Android Studio that are used to develop Android apps are described.
5) Setting up the development environment including installing Java, an IDE, Android SDK and tools is covered.
6) The Dalvik Virtual Machine and how it converts Java code to run efficiently on mobile
4. 4
13 November, 2013
What is Android?
o
o
o
o
o
Operating system based on Linux.
Open Source by Search Giant.
Apps typically written in Java.
Apps run on the Dalvik Virtual Machine(DVM).
November 2007, Open Handset Alliance formed to
develop open standards for mobile devices.
Open Handset Alliance:
o
Google formed a group of hardware, software, and
telecommunication companies with the goal of
Tenet Technetronics
contributing to Android development
6. 6
13 November, 2013
History
o
o
o
Android Inc. was founded by Andy Rubin, Rich miner, Nick
sears and Chris White in 2003.
Acquired by Google in July 2005.
The first android phone was HTC G1 Dream(with cupcake)
Released in October 2008.
Tenet Technetronics
8. 8
13 November, 2013
Android Features
o
o
o
o
o
o
o
o
o
o
Open Source framework
Very simple.
Availability of Apps.
Supports 2D,3D graphics.
Java support.
Easy to customize.
Better Notification System(email and various widgets).
SQLite Database.
Bluetooth, EDGE,3G,4G and Wi-Fi .
Camera ,GPS,Compass, and accelerometer.
Tenet Technetronics
10. 10
13 November, 2013
Application Components
Activities – visual user interface focused on a
single thing a user can do
Services – no visual interface – they run in the
background
Broadcast Receivers – receive and react to
broadcast announcements
Content Providers – allow data exchange
between applications
Tenet Technetronics
12. 12
13 November, 2013
IDE: (Integrated
Development Environment)
o
Programming Environment that consists of
o
o
A Code Editor,
A compiler,
A Debugger,
A GUI builder.
User-Friendly Framework.
Eclipse, Net beans, Android Studio,
Processing, Xamarin Studio, etc.,
Tenet Technetronics
14. 14
13 November, 2013
Development Tools:
o
o
o
o
o
Java JDK.
Eclipse or Net beans.
Android Development Tools(ADT Plugin).
Android latest SDK
Programming Languages
Java
Tenet Technetronics
17. 17
13 November, 2013
Dalvik Virtual Machine
o
o
o
o
o
Java-” write once, run anywhere”.
Software that runs the apps on
Android devices.
Invented by Dan Bornstein(Google).
Register-based.
A tool called dx is used to convert
some (but not all) Java .class files
into the .dex (Dalvik
Executable)format.
Tenet Technetronics
18. 18
13 November, 2013
DVM
o
o
run on a slow CPU
Multiple classes are included in a single
.dex file.
source code
Java compiler
.class file
dx
(conversion tool)
.dex file
(Dalvik
executable)
Tenet Technetronics
29. 29
13 November, 2013
Linear Layout
oAll
the elements are
displayed in a linear
fashion
oHorizontally or Vertically
Tenet Technetronics
30. 30
13 November, 2013
Relative Layout
o
o
Designed to display
child View controls in
relation to each other
Every element
arranges itself relative
to other elements or a
parent element.
Tenet Technetronics
31. 31
13 November, 2013
Table Layout
o
o
Designed to organize
child View controls
into rows and columns.
Divide your layouts
into rows and
columns.
Tenet Technetronics
32. 32
13 November, 2013
Frame Layout
oDisplay
only a single UI
element at a time, or multiple
UI elements within Frame
Layout
oEach element will be
positioned based on the top
left of the screen.
Tenet Technetronics
33. 33
13 November, 2013
Drawables
o
o
o
referencing an image
file from your project
resources.
Supported file types are
PNG and JPG.
Background image for
Layout, button, etc..
Tenet Technetronics
35. 35
13 November, 2013
Activity Navigation
o
o
o
Moving From one Activity to another.
Pass values from one activity to another
Activity (Intents).
Example.
Tenet Technetronics
37. 37
13 November, 2013
Views And View Groups
we can declare the layout in two ways:
o
o
Programmatically
Declaring the widgets or UI elements in
XML.
The layout consists of Views and View
Groups.
Tenet Technetronics
38. 38
13 November, 2013
View Groups
o
o
o
Layouts are called View groups
In which the child Views or View Groups
are arranged either vertically or
horizontally.
Example
Tenet Technetronics
40. 40
13 November, 2013
Manifest and Permissions
o
o
A resource file which contains all the details
needed by the android system about the
application.
This is an xml file which must be named as
AndroidManifest.xml and placed at application
root.
Tenet Technetronics
41. 41
13 November, 2013
Android Manifest
It allows us to define
o The packages, API, libraries needed for the
application.
o Basic building blocks of application like
activities, services and etc.
o Details about permissions.
o Set of classes needed before launch.
Tenet Technetronics
42. 42
13 November, 2013
Elements of
AndroidManifest.xml
o
o
o
o
o
o
o
o
o
o
uses-permission
permission
permission-group
permission-tree
Instrumentation
uses-sdk
uses-configuration
uses-feature
supports-screens, compatible-screens
supports-gl-texture
Tenet Technetronics
43. 43
13 November, 2013
Elements of Manifest
uses-permission purpose of security.
o permission Access Control.
o uses- sdk the platform compatibility.
o uses-configuration set of hardware and
software requirement.
o supports-screens,
and compatible-screens screen
configuration mode and size of the screen
o
Tenet Technetronics
46. 46
13 November, 2013
Menu
o
o
o
A common user interface component in
many types of applications.
Interface for managing the items in a
menu.
If you're developing for Android 2.3 or
lower, users can reveal the options menu
panel by pressing the Menu button.
Tenet Technetronics
47. 47
13 November, 2013
Menu
o
Context menus
o
Options menus
o
a floating list of menu items that appears when a user
touches and holds a particular item displayed in the view
the one that appears when a user touches the menu
button on the mobile.
Sub menus
a floating list of menu items that appears when the user
touches a menu item that contains a nested menu
Tenet Technetronics
48. 48
13 November, 2013
Tabs
o
o
o
A nice way to present multiple
thing on a Single Screen
Tabs in the action bar make it
easy to explore and switch
between different views or
functional aspects.
Example
Tenet Technetronics