SlideShare a Scribd company logo
20IT601PE-
MOBILE APPLICATION
DEVELOPMENT
UNIT I
ANDROID OVERVIEW
Introduction – Android SDK features – OHA
– Development framework – Getting started –
developing for android, mobile devices - ADT –
Creating an applications and activities -
Application manifest – Android Application Life
Cycle – Understanding application priority -
Externalizing resources – Android application
class – Android Activities
Development framework
 In general, a framework is a real or conceptual structure
intended to serve as a support or guide for the building of
something that expands the structure into something useful.
 An Android application framework is a software toolkit that
enables app developers to piece together a finished product
that meets the requirements of its proprietor.
Development framework
 A framework provides the bones of an application, to be
fleshed out with graphics, animation, special features and
functionality.
 The Application Framework layer provides many higher-
level services to applications in the form of Java classes.
Android architecture or Android software stack is
categorized into five parts:
Linux kernel
Native libraries (middleware)
Android Runtime
Application Framework
Application Layer
Unit I- ANDROID OVERVIEW.ppt
1) Linux kernel
• It is the heart of android architecture that exists
at the root of android architecture.
• Linux kernel is responsible for device drivers,
power management, memory management,
device management and resource access.
2) Native Libraries
• Running on the top of linux kernel, Native libraries such as
WebKit, OpenGL, FreeType, SQLite, Media, C runtime
library (libc) etc.
• The WebKit library is responsible for browser support and
Internet security;
• SQLite is for database,
• FreeType for font support,
• Media for playing and recording audio and video formats.
Some key core Android libraries available to the Android
developer is as follows −
• android.app − Provides access to the application model and is
the cornerstone of all Android applications.
• android.content − Facilitates content access, publishing and
messaging between applications and application components.
• android.database − Used to access data published by content
providers and includes SQLite database management classes.
• android.opengl − A Java interface to the OpenGL ES 3D
graphics rendering API.
• android.os − Provides applications with access to standard
operating system services including messages, system services and
inter-process communication.
• android.text − Used to render and manipulate text on a device
display.
• android.view − The fundamental building blocks of application
user interfaces.
• android.widget − A rich collection of pre-built user interface
components such as buttons, labels, list views, layout managers,
radio buttons etc.
• android.webkit − A set of classes intended to allow web-browsing
capabilities to be built into applications.
3) Android Runtime
 In android runtime, there are core libraries and DVM
(Dalvik Virtual Machine) which is responsible to run
android application.
 One of the key elements of Android is the Dalvik VM,
Android uses its own custom VM designed to ensure that
multiple instances run efficiently on a single device.
 DVM is like JVM but it is optimized for mobile devices.
 The Dalvik VM makes use of Linux core features like
memory management and multi-threading, which is
intrinsic in the Java language.
 It consumes less memory and provides fast performance.
4) Android Framework
 On the top of Native libraries and android runtime, there
is android framework.
 Android framework includes Android API's such as UI
(User Interface), telephony, resources, locations, Content
Providers (data) and package managers.
 It provides a lot of classes and interfaces for android
application development.
5) Application Layer
 On the top of android framework, there are applications.
 All applications such as home, contact, settings, games,
browsers are using android framework that uses android
runtime and libraries.
 Android runtime and native libraries are using linux
kernal.
Android Core Building Blocks
 An android component is simply a piece of code that has
a well defined life cycle e.g. Activity, Receiver, and
Service etc.
 The core building blocks or fundamental components of
android are activities, views, intents, services, content
providers, fragments and AndroidManifest.xml.
 Activity
An activity is a class that represents a single screen.
It is like a Frame in AWT.
 View
A view is the UI element such as button, label, text field etc.
Anything that you see is a view.
 Intent
Intent is used to invoke components. It is mainly used to:
• Start the service
• Launch an activity
• Display a web page
• Display a list of contacts
• Broadcast a message
• Dial a phone call etc.
• For example, write the following code to view the
webpage.
Intent intent=new Intent (Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.javatpoint.com"));
startActivity(intent);
Service
• Service is a background process that can run for a long time.
• There are two types of services local and remote.
• Local service is accessed from within the application
whereas remote service is accessed remotely from other
applications running on the same device.
Content Provider
• Content Providers are used to share data between the
applications.
• Fragment
• Fragments are like parts of activity.
• An activity can display one or more fragments on the screen
at the same time.
AndroidManifest.xml
• It contains information about activities, content providers,
permissions etc.
• It is like the web.xml file in Java EE.
Android Virtual Device (AVD)
• It is used to test the android application without the need
for mobile or tablet etc.
• It can be created in different configurations to emulate
different types of real devices.
Android Activity Lifecycle
• Activity is one of the building blocks of Android OS.
• Activity is a screen that user interact with.
• Every Activity in android has lifecycle like created,
started, resumed, paused, stopped or destroyed.
• Activity is a class pre-written in Java Programming. An
activity is the single screen in android. It is like
window or frame of Java.
Android Activity Lifecycle methods
The 7 lifecycle methods of Activity describes how activity will
behave at different states.
•onCreate()
•onStart()
•onResume()
•onPause()
•onStop()
•onRestart()
•onDestroy
Android Activity Lifecycle methods
•onCreate() – Called when the activity is first created
•onStart() – Called just after it’s creation or by restart
method after onStop(). Here Activity start becoming visible
to user
•onResume() – Called when Activity is visible to user and
user can interact with it
•onPause() – Called when Activity content is not visible
because user resume previous activity
Android Activity Lifecycle methods
•onStop() – Called when activity is not visible to user
because some other activity takes place of it
•onRestart() – Called when user comes on screen or resume
the activity which was stopped
•onDestroy – Called when Activity is not in background
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
EXAMPLE
Following is the content of the modified main activity
file src/com.example.helloworld/MainActivity.java.
This file includes each of the fundamental life cycle
methods.
The Log.d() method has been used to generate log
messages −
package com.example.helloworld;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
public class MainActivity extends Activity {
String msg = "Android : ";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.d(msg, "The onCreate() event"); }
/** Called when the activity is about to become visible. */ @Override
protected void onStart() {
super.onStart();
Log.d(msg, "The onStart() event"); }
/** Called when the activity has become visible. */
@Override
protected void onResume() {
super.onResume();
Log.d(msg, "The onResume() event"); }
/** Called when another activity is taking focus. */
@Override
protected void onPause() {
super.onPause();
Log.d(msg, "The onPause() event"); }
/** Called when the activity is no longer visible. */
@Override
protected void onStop() {
super.onStop();
Log.d(msg, "The onStop() event"); }
/** Called just before the activity is destroyed. */
@Override
public void onDestroy() {
super.onDestroy();
Log.d(msg, "The onDestroy() event");
} }
ANDROID DEVELOPMENT TOOLS
• Android Development Tools (ADT) is a plug-in for the
Eclipse IDE that is designed to give you a powerful,
integrated environment in which to build Android
applications.
• ADT is the Android Developer Tools plug-in for Eclipse.
• ADT is about the useful code stuff: for example the libraries,
packages.
• The ADT plug-in for Eclipse uses the SDK tools as part of
its work.
ADT vs Android SDK
• The Android SDK contains the tools and
related files necessary to build an Android
application.
• SDK is actually about the tools: for example
Debugging.
Android Development Tools (ADT)
ADT plug-in incorporates many of the tools into the
Eclipse IDE, where you can access them from the DDMS
perspective, including the following:
Android Virtual Device and SDK Managers
Android Emulator
Dalvik Debug Monitoring Service (DDMS)
Android Debug Bridge (ADB)
Android Asset Packaging Tool (AAPT)
SQLite3
MkSDCard
Android Virtual Device and SDK Managers
• Used to create and manage AVDs and to download
SDK packages, respectively.
• The AVD hosts an Emulator running on a particular
build of Android,
• It specify the supported SDK version, screen
resolution, amount of SD card storage available, and
available hardware capabilities (such as touchscreens
and GPS).
Android Emulator
• Use the Emulator to test and debug your Android
applications
Dalvik Debug Monitoring Service (DDMS)
• Use the DDMS to monitor and control the Emulators on
which you’re debugging your applications.
Android Debug Bridge (ADB)
• A client-server application that provides a link to virtual and
physical devices. It lets you copy files, install compiled
application packages (.apk), and run shell commands.
Android Asset Packaging Tool (AAPT)
• Constructs the distributable Android package fi les (.apk).
SQLite3
• A database tool that you can use to access the SQLite
database fi les created and used by Android.
MkSDCard
• Creates an SD card disk image that can be used by the
Emulator to simulate an external storage card.
Creating an Applications and Activities
• Used to create and manage AVDs and to download
SDK packages, respectively.
• The AVD hosts an Emulator running on a particular
build of Android,
• It specify the supported SDK version, screen
resolution, amount of SD card storage available, and
available hardware capabilities (such as touchscreens
and GPS).
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt

More Related Content

PPT
Introduction to android sessions new
PDF
Android Workshop_1
PDF
20IT601PE - Mobile Application Development PPT.pdf
PDF
Android Workshop Part 1
PPT
introductiontoandroiddevelopment (2).ppt
PPTX
Introduction to Android Development Part 1
PDF
Installing eclipse & sdk
PPTX
Android beginners David
Introduction to android sessions new
Android Workshop_1
20IT601PE - Mobile Application Development PPT.pdf
Android Workshop Part 1
introductiontoandroiddevelopment (2).ppt
Introduction to Android Development Part 1
Installing eclipse & sdk
Android beginners David

Similar to Unit I- ANDROID OVERVIEW.ppt (20)

PPTX
UNIT5newpart1pptx__2024_11_13_09_51_59 (1).pptx
PPT
PPTX
Android Basic Concept
DOCX
Android Tutorial For Beginners Part-1
PPT
Introduction to Android Development
PDF
Android development first steps
PPTX
Android my
PPTX
Dori waldman android _course
PPTX
Mobile Application Development
PPTX
Android 101 Session @thejunction32
PPTX
Introduction to Android (before 2015)
DOCX
Android tutorial
PPTX
OS in mobile devices [Android]
PDF
Android Development
PPTX
architecture of android.pptx
PPTX
Technology and Android.pptx
PPT
Android OS
PPTX
Android apps development
PDF
Wifi Direct Based Chat And File Transfer Android Application
PDF
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
UNIT5newpart1pptx__2024_11_13_09_51_59 (1).pptx
Android Basic Concept
Android Tutorial For Beginners Part-1
Introduction to Android Development
Android development first steps
Android my
Dori waldman android _course
Mobile Application Development
Android 101 Session @thejunction32
Introduction to Android (before 2015)
Android tutorial
OS in mobile devices [Android]
Android Development
architecture of android.pptx
Technology and Android.pptx
Android OS
Android apps development
Wifi Direct Based Chat And File Transfer Android Application
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Ad

Recently uploaded (20)

PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT 4 Total Quality Management .pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PPT on Performance Review to get promotions
PDF
Well-logging-methods_new................
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
web development for engineering and engineering
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT 4 Total Quality Management .pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT on Performance Review to get promotions
Well-logging-methods_new................
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Lesson 3_Tessellation.pptx finite Mathematics
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
web development for engineering and engineering
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Geodesy 1.pptx...............................................
bas. eng. economics group 4 presentation 1.pptx
Structs to JSON How Go Powers REST APIs.pdf
Lecture Notes Electrical Wiring System Components
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Foundation to blockchain - A guide to Blockchain Tech
additive manufacturing of ss316l using mig welding
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Ad

Unit I- ANDROID OVERVIEW.ppt

  • 2. UNIT I ANDROID OVERVIEW Introduction – Android SDK features – OHA – Development framework – Getting started – developing for android, mobile devices - ADT – Creating an applications and activities - Application manifest – Android Application Life Cycle – Understanding application priority - Externalizing resources – Android application class – Android Activities
  • 3. Development framework  In general, a framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful.  An Android application framework is a software toolkit that enables app developers to piece together a finished product that meets the requirements of its proprietor.
  • 4. Development framework  A framework provides the bones of an application, to be fleshed out with graphics, animation, special features and functionality.  The Application Framework layer provides many higher- level services to applications in the form of Java classes.
  • 5. Android architecture or Android software stack is categorized into five parts: Linux kernel Native libraries (middleware) Android Runtime Application Framework Application Layer
  • 7. 1) Linux kernel • It is the heart of android architecture that exists at the root of android architecture. • Linux kernel is responsible for device drivers, power management, memory management, device management and resource access.
  • 8. 2) Native Libraries • Running on the top of linux kernel, Native libraries such as WebKit, OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc. • The WebKit library is responsible for browser support and Internet security; • SQLite is for database, • FreeType for font support, • Media for playing and recording audio and video formats.
  • 9. Some key core Android libraries available to the Android developer is as follows − • android.app − Provides access to the application model and is the cornerstone of all Android applications. • android.content − Facilitates content access, publishing and messaging between applications and application components. • android.database − Used to access data published by content providers and includes SQLite database management classes. • android.opengl − A Java interface to the OpenGL ES 3D graphics rendering API.
  • 10. • android.os − Provides applications with access to standard operating system services including messages, system services and inter-process communication. • android.text − Used to render and manipulate text on a device display. • android.view − The fundamental building blocks of application user interfaces. • android.widget − A rich collection of pre-built user interface components such as buttons, labels, list views, layout managers, radio buttons etc. • android.webkit − A set of classes intended to allow web-browsing capabilities to be built into applications.
  • 11. 3) Android Runtime  In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is responsible to run android application.  One of the key elements of Android is the Dalvik VM, Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device.  DVM is like JVM but it is optimized for mobile devices.  The Dalvik VM makes use of Linux core features like memory management and multi-threading, which is intrinsic in the Java language.  It consumes less memory and provides fast performance.
  • 12. 4) Android Framework  On the top of Native libraries and android runtime, there is android framework.  Android framework includes Android API's such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers.  It provides a lot of classes and interfaces for android application development.
  • 13. 5) Application Layer  On the top of android framework, there are applications.  All applications such as home, contact, settings, games, browsers are using android framework that uses android runtime and libraries.  Android runtime and native libraries are using linux kernal.
  • 14. Android Core Building Blocks  An android component is simply a piece of code that has a well defined life cycle e.g. Activity, Receiver, and Service etc.  The core building blocks or fundamental components of android are activities, views, intents, services, content providers, fragments and AndroidManifest.xml.
  • 15.  Activity An activity is a class that represents a single screen. It is like a Frame in AWT.  View A view is the UI element such as button, label, text field etc. Anything that you see is a view.  Intent Intent is used to invoke components. It is mainly used to: • Start the service • Launch an activity • Display a web page • Display a list of contacts • Broadcast a message • Dial a phone call etc.
  • 16. • For example, write the following code to view the webpage. Intent intent=new Intent (Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.javatpoint.com")); startActivity(intent);
  • 17. Service • Service is a background process that can run for a long time. • There are two types of services local and remote. • Local service is accessed from within the application whereas remote service is accessed remotely from other applications running on the same device. Content Provider • Content Providers are used to share data between the applications. • Fragment • Fragments are like parts of activity. • An activity can display one or more fragments on the screen at the same time.
  • 18. AndroidManifest.xml • It contains information about activities, content providers, permissions etc. • It is like the web.xml file in Java EE. Android Virtual Device (AVD) • It is used to test the android application without the need for mobile or tablet etc. • It can be created in different configurations to emulate different types of real devices.
  • 19. Android Activity Lifecycle • Activity is one of the building blocks of Android OS. • Activity is a screen that user interact with. • Every Activity in android has lifecycle like created, started, resumed, paused, stopped or destroyed. • Activity is a class pre-written in Java Programming. An activity is the single screen in android. It is like window or frame of Java.
  • 20. Android Activity Lifecycle methods The 7 lifecycle methods of Activity describes how activity will behave at different states. •onCreate() •onStart() •onResume() •onPause() •onStop() •onRestart() •onDestroy
  • 21. Android Activity Lifecycle methods •onCreate() – Called when the activity is first created •onStart() – Called just after it’s creation or by restart method after onStop(). Here Activity start becoming visible to user •onResume() – Called when Activity is visible to user and user can interact with it •onPause() – Called when Activity content is not visible because user resume previous activity
  • 22. Android Activity Lifecycle methods •onStop() – Called when activity is not visible to user because some other activity takes place of it •onRestart() – Called when user comes on screen or resume the activity which was stopped •onDestroy – Called when Activity is not in background
  • 29. EXAMPLE Following is the content of the modified main activity file src/com.example.helloworld/MainActivity.java. This file includes each of the fundamental life cycle methods. The Log.d() method has been used to generate log messages −
  • 30. package com.example.helloworld; import android.os.Bundle; import android.app.Activity; import android.util.Log; public class MainActivity extends Activity { String msg = "Android : "; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.d(msg, "The onCreate() event"); } /** Called when the activity is about to become visible. */ @Override protected void onStart() { super.onStart(); Log.d(msg, "The onStart() event"); }
  • 31. /** Called when the activity has become visible. */ @Override protected void onResume() { super.onResume(); Log.d(msg, "The onResume() event"); } /** Called when another activity is taking focus. */ @Override protected void onPause() { super.onPause(); Log.d(msg, "The onPause() event"); }
  • 32. /** Called when the activity is no longer visible. */ @Override protected void onStop() { super.onStop(); Log.d(msg, "The onStop() event"); } /** Called just before the activity is destroyed. */ @Override public void onDestroy() { super.onDestroy(); Log.d(msg, "The onDestroy() event"); } }
  • 33. ANDROID DEVELOPMENT TOOLS • Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications. • ADT is the Android Developer Tools plug-in for Eclipse. • ADT is about the useful code stuff: for example the libraries, packages. • The ADT plug-in for Eclipse uses the SDK tools as part of its work.
  • 34. ADT vs Android SDK • The Android SDK contains the tools and related files necessary to build an Android application. • SDK is actually about the tools: for example Debugging.
  • 35. Android Development Tools (ADT) ADT plug-in incorporates many of the tools into the Eclipse IDE, where you can access them from the DDMS perspective, including the following: Android Virtual Device and SDK Managers Android Emulator Dalvik Debug Monitoring Service (DDMS) Android Debug Bridge (ADB) Android Asset Packaging Tool (AAPT) SQLite3 MkSDCard
  • 36. Android Virtual Device and SDK Managers • Used to create and manage AVDs and to download SDK packages, respectively. • The AVD hosts an Emulator running on a particular build of Android, • It specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touchscreens and GPS).
  • 37. Android Emulator • Use the Emulator to test and debug your Android applications Dalvik Debug Monitoring Service (DDMS) • Use the DDMS to monitor and control the Emulators on which you’re debugging your applications. Android Debug Bridge (ADB) • A client-server application that provides a link to virtual and physical devices. It lets you copy files, install compiled application packages (.apk), and run shell commands.
  • 38. Android Asset Packaging Tool (AAPT) • Constructs the distributable Android package fi les (.apk). SQLite3 • A database tool that you can use to access the SQLite database fi les created and used by Android. MkSDCard • Creates an SD card disk image that can be used by the Emulator to simulate an external storage card.
  • 39. Creating an Applications and Activities • Used to create and manage AVDs and to download SDK packages, respectively. • The AVD hosts an Emulator running on a particular build of Android, • It specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touchscreens and GPS).