SlideShare a Scribd company logo
1 of 67
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
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
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

Similar to Unit I- ANDROID OVERVIEW.ppt

Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]Yatharth Aggarwal
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfweerabahu
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Dasdscfetju
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptxmuthulakshmi cse
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
Android architecture
Android architectureAndroid architecture
Android architecturepoojapainter
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 

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

Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android
AndroidAndroid
Android
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Das
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptx
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Synapseindia android middleware
Synapseindia android middlewareSynapseindia android middleware
Synapseindia android middleware
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android Basic Concept
Android Basic Concept Android Basic Concept
Android Basic Concept
 
Android my
Android myAndroid my
Android my
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 

Recently uploaded

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

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
  • 6.
  • 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
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 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).