SlideShare a Scribd company logo
1 of 25
Download to read offline
General Course Outline
• Introduction to Android and Mobile Devices
• Setting up Development Environment
• Application Architecture and Lifecycle
• Java Language Basics and Syntax
• Object Oriented Programming in Java
• Vertical and Horizontal Libraries in Java
• Object Oriented Principles and Practice
• Building Android Applications
• Android User Interface
• Common Controls
• Android Application Components: Activity, BroadcastListener,
Service, Content Provider
System Requirements
Setting up Development Environment
Supported OS
2.Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32-
or 64-bit)
3.Mac OS X 10.5.8 or later (x86 only)
4.Linux (tested on Ubuntu Linux, Lucid Lynx)
Supported Development Environment (Eclipse IDE based)
2.Eclipse 3.4 (Ganymede) or greater/Eclipse Classic (versions 3.5.1
and higher)
3.JDK 1.5 or 1.6
4.ADT Plugin
To set up the development environment, we need:
2. Java Development Kit (JDK 1.5+, 1.6 is preferable)
3. Eclipse IDE
4. Android SDK
Setting up Development Environment(Contd.)
Java Development Kit (JDK)
Setting up Development Environment (Contd.)
Download Link: http://www.java.com/en/download/index.jsp
Download JDK from here and Install JDK
Eclipse IDE
Setting up Development Environment (Contd.)
Download Link: http://eclipse.org/downloads/
Download the highlighted version of Eclipse IDE
Android SDK
Setting up Development Environment (Contd.)
Link:
http://developer.android.com/sdk/index.html
Download and Install the SDK starter package from the table above
(Highlighted)
Android SDK Setup (1)
Setting up Development Environment (Contd.)
1. Install available packages to get all SDK platform versions
Android SDK Setup (2)
Setting up Development Environment (Contd.)
2. Installation progress
Android SDK Setup (3)
Setting up Development Environment (Contd.)
3. ADT Plugin for Eclipse
ADT Plugin:
Android Development Tools (ADT) is a plugin for the Eclipse IDE for
•extending the capabilities of Eclipse to set up new Android projects
•creating an application UI
• adding components based on the Android Framework API
• debugging your applications using the Android SDK tools
• exporting signed (or unsigned) APKs in order to distribute your application
We’ll see the 5 points gradually during development
Android SDK Setup (4)
Setting up Development Environment (Contd.)
4. Installing the ADT
• Start Eclipse, then select Help >
Install New Software....
• Click Add, in the top-right
corner.
• In the next window, you'll see a
list of the tools to be
downloaded. Click Next.
• Read and accept the license
agreements, then click Finish.
• When the installation
completes, restart Eclipse.
Android SDK Setup (5)
Setting up Development Environment (Contd.)
5. Set SDK path
• Start Eclipse, then select
Window > Preferences
• Browse and show the path of
Android SDK.
• Press Apply and OK.
Development Environment Setup is now completed!
Let’s say “Hello” to the Android World!
In the subsequent slides:
•We’ll create an application step by
step using the help of IDE and ADT.
•We’ll then explain application
structure and identify the building
blocks.
•We’ll experiment with components
and learn to convert our innovative
ideas into neat apps.
Now that our development environment is
ready, we’ll build our first Android application.
Let’s say “Hello” to the Android World! (Contd.)
1. Start Eclipse and Go to File>New>Android Project
2. We keep project name “Hello World”
(Since 1970 Ritchie’s book on C
programming, programmers always say
Hello World first)
3. Build Target “Android1.6”
4. Application name: “Hello World”
5. Package name: com.sentinelbd.hallo
6. Initial Activity Name: HalloActivity
7. Min SDK Version: 4
8. Click Finish
Congratulations!
You’ve just created your
first Android application
We’ll explain each input shortly
Let’s Go Deep…
Created Project has the following structure
Project Structure
-Source (src)
-Generated Class (gen)
-Android 1.6 library
-Assets (assets)
-Resource(res)
-drawable-hdpi
-drawable-ldpi
-drawable-mdpi
-layout
-values
-AndroidMenifest.xml
-default.properties
Let’s Go Deep… (Contd.)
To run the app in emulator, we have to do the following steps:
3.Create AVD (Android Virtual Device)
4.Create Run Configuration
5.Run the Application
To run the app in device, we have to do the following steps:
3.Install device driver
4.Connect device through USB
5.Create Run Configuration
6.Run the Application
We’ll run the app in emulator for now
Let’s Go Deep… (Contd.)
1. Create AVD (Android Virtual Device)
Use Android SDK & AVD Manager to create AVD
Let’s Go Deep… (Contd.)
2. Create Run Configuration
• Create a Run
Configuration
• Browse and select
the project to run
Let’s Go Deep… (Contd.)
3. Select AVD & Run
Click Run to start AVD/emulator
Let’s Go Deep… (Contd.)
Result in Emulator
Now its time to analyze how it works
Project Structure…
Created Project has the following structure
Project Structure
-Source (src)
-Generated Class (gen)
-Android 1.6 library
-Assets (assets)
-Resource(res)
-drawable-hdpi
-drawable-ldpi
-drawable-mdpi
-layout
-values
-AndroidMenifest.xml
-default.properties
Project Structure (Contd.)
-Source (src)
We have used only one class here which is an Activity named HalloActivity. We’ll
describe about Activity in detail with lifecycle shortly. For now we can consider
Activity as Android analogue for the window or dialog in a desktop application. It
can load view from xml layout (here main.xml under res/layout folder)
In the HelloActivity class the view
of the Activity is set from main.xml
given below
Project Structure (Contd.)
-res/layout/main.xml
• UI Layout can be defined from source code using View or by layout xmls.
• The layout xml can be generated by visual tool given by ADT
Project Structure (Contd.)
-res/drawable
• From Android 1.6 to support different screen sizes and screen densities graphic files
are kept in 3 different folders drawable-hdpi, drawable-ldpi and drawable-mdpi
• In our current project, they contain only default icon file with different dimensions
to support devices with different screen resolution.
-assets
Holds other static files you wish packaged with the application for deployment
onto the device. In this project, we have none
-gen/R.java -values/strings.xml
Project Structure (Contd.)
-AndroidMenifest.xml
XML file describing the application being built and what components – activities,
services, etc. – are being supplied by that application
Hmm.. No public static void main() ???
What is the Entry Point of an Android App?
Instead of main(), Android apps have the 4 essential components which can
instantiate and run as needed:
1. Activities
2. Services
3. Broadcast Receivers
4. Content Providers
Whenever there's a request that should be handled by a particular
component, Android makes sure that
•the application process of the component is running,
•starting it if necessary, and
•that an appropriate instance of the component is available,
•creating the instance if necessary.
But how a request is made? What is the missing link?

More Related Content

Similar to ANDROID PPT 1.pdf

Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdkTran Le Hoan
 
Android application development
Android application developmentAndroid application development
Android application developmentslidesuren
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Developmentonkar_bhosle
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studioAbdul Basit
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting StartedHemant Chhapoliya
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.pptBijayKc16
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptxGandhiMathy6
 

Similar to ANDROID PPT 1.pdf (20)

Android Basic
Android BasicAndroid Basic
Android Basic
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
 
Android application development
Android application developmentAndroid application development
Android application development
 
Anveshan android
Anveshan androidAnveshan android
Anveshan android
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studio
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Android
AndroidAndroid
Android
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android app upload
Android app uploadAndroid app upload
Android app upload
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Android studio
Android studioAndroid studio
Android studio
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptx
 
Android Development
Android DevelopmentAndroid Development
Android Development
 

Recently uploaded

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 

Recently uploaded (20)

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 

ANDROID PPT 1.pdf

  • 1. General Course Outline • Introduction to Android and Mobile Devices • Setting up Development Environment • Application Architecture and Lifecycle • Java Language Basics and Syntax • Object Oriented Programming in Java • Vertical and Horizontal Libraries in Java • Object Oriented Principles and Practice • Building Android Applications • Android User Interface • Common Controls • Android Application Components: Activity, BroadcastListener, Service, Content Provider
  • 2. System Requirements Setting up Development Environment Supported OS 2.Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit) 3.Mac OS X 10.5.8 or later (x86 only) 4.Linux (tested on Ubuntu Linux, Lucid Lynx) Supported Development Environment (Eclipse IDE based) 2.Eclipse 3.4 (Ganymede) or greater/Eclipse Classic (versions 3.5.1 and higher) 3.JDK 1.5 or 1.6 4.ADT Plugin
  • 3. To set up the development environment, we need: 2. Java Development Kit (JDK 1.5+, 1.6 is preferable) 3. Eclipse IDE 4. Android SDK Setting up Development Environment(Contd.)
  • 4. Java Development Kit (JDK) Setting up Development Environment (Contd.) Download Link: http://www.java.com/en/download/index.jsp Download JDK from here and Install JDK
  • 5. Eclipse IDE Setting up Development Environment (Contd.) Download Link: http://eclipse.org/downloads/ Download the highlighted version of Eclipse IDE
  • 6. Android SDK Setting up Development Environment (Contd.) Link: http://developer.android.com/sdk/index.html Download and Install the SDK starter package from the table above (Highlighted)
  • 7. Android SDK Setup (1) Setting up Development Environment (Contd.) 1. Install available packages to get all SDK platform versions
  • 8. Android SDK Setup (2) Setting up Development Environment (Contd.) 2. Installation progress
  • 9. Android SDK Setup (3) Setting up Development Environment (Contd.) 3. ADT Plugin for Eclipse ADT Plugin: Android Development Tools (ADT) is a plugin for the Eclipse IDE for •extending the capabilities of Eclipse to set up new Android projects •creating an application UI • adding components based on the Android Framework API • debugging your applications using the Android SDK tools • exporting signed (or unsigned) APKs in order to distribute your application We’ll see the 5 points gradually during development
  • 10. Android SDK Setup (4) Setting up Development Environment (Contd.) 4. Installing the ADT • Start Eclipse, then select Help > Install New Software.... • Click Add, in the top-right corner. • In the next window, you'll see a list of the tools to be downloaded. Click Next. • Read and accept the license agreements, then click Finish. • When the installation completes, restart Eclipse.
  • 11. Android SDK Setup (5) Setting up Development Environment (Contd.) 5. Set SDK path • Start Eclipse, then select Window > Preferences • Browse and show the path of Android SDK. • Press Apply and OK. Development Environment Setup is now completed!
  • 12. Let’s say “Hello” to the Android World! In the subsequent slides: •We’ll create an application step by step using the help of IDE and ADT. •We’ll then explain application structure and identify the building blocks. •We’ll experiment with components and learn to convert our innovative ideas into neat apps. Now that our development environment is ready, we’ll build our first Android application.
  • 13. Let’s say “Hello” to the Android World! (Contd.) 1. Start Eclipse and Go to File>New>Android Project 2. We keep project name “Hello World” (Since 1970 Ritchie’s book on C programming, programmers always say Hello World first) 3. Build Target “Android1.6” 4. Application name: “Hello World” 5. Package name: com.sentinelbd.hallo 6. Initial Activity Name: HalloActivity 7. Min SDK Version: 4 8. Click Finish Congratulations! You’ve just created your first Android application We’ll explain each input shortly
  • 14. Let’s Go Deep… Created Project has the following structure Project Structure -Source (src) -Generated Class (gen) -Android 1.6 library -Assets (assets) -Resource(res) -drawable-hdpi -drawable-ldpi -drawable-mdpi -layout -values -AndroidMenifest.xml -default.properties
  • 15. Let’s Go Deep… (Contd.) To run the app in emulator, we have to do the following steps: 3.Create AVD (Android Virtual Device) 4.Create Run Configuration 5.Run the Application To run the app in device, we have to do the following steps: 3.Install device driver 4.Connect device through USB 5.Create Run Configuration 6.Run the Application We’ll run the app in emulator for now
  • 16. Let’s Go Deep… (Contd.) 1. Create AVD (Android Virtual Device) Use Android SDK & AVD Manager to create AVD
  • 17. Let’s Go Deep… (Contd.) 2. Create Run Configuration • Create a Run Configuration • Browse and select the project to run
  • 18. Let’s Go Deep… (Contd.) 3. Select AVD & Run Click Run to start AVD/emulator
  • 19. Let’s Go Deep… (Contd.) Result in Emulator Now its time to analyze how it works
  • 20. Project Structure… Created Project has the following structure Project Structure -Source (src) -Generated Class (gen) -Android 1.6 library -Assets (assets) -Resource(res) -drawable-hdpi -drawable-ldpi -drawable-mdpi -layout -values -AndroidMenifest.xml -default.properties
  • 21. Project Structure (Contd.) -Source (src) We have used only one class here which is an Activity named HalloActivity. We’ll describe about Activity in detail with lifecycle shortly. For now we can consider Activity as Android analogue for the window or dialog in a desktop application. It can load view from xml layout (here main.xml under res/layout folder) In the HelloActivity class the view of the Activity is set from main.xml given below
  • 22. Project Structure (Contd.) -res/layout/main.xml • UI Layout can be defined from source code using View or by layout xmls. • The layout xml can be generated by visual tool given by ADT
  • 23. Project Structure (Contd.) -res/drawable • From Android 1.6 to support different screen sizes and screen densities graphic files are kept in 3 different folders drawable-hdpi, drawable-ldpi and drawable-mdpi • In our current project, they contain only default icon file with different dimensions to support devices with different screen resolution. -assets Holds other static files you wish packaged with the application for deployment onto the device. In this project, we have none -gen/R.java -values/strings.xml
  • 24. Project Structure (Contd.) -AndroidMenifest.xml XML file describing the application being built and what components – activities, services, etc. – are being supplied by that application
  • 25. Hmm.. No public static void main() ??? What is the Entry Point of an Android App? Instead of main(), Android apps have the 4 essential components which can instantiate and run as needed: 1. Activities 2. Services 3. Broadcast Receivers 4. Content Providers Whenever there's a request that should be handled by a particular component, Android makes sure that •the application process of the component is running, •starting it if necessary, and •that an appropriate instance of the component is available, •creating the instance if necessary. But how a request is made? What is the missing link?