SlideShare a Scribd company logo
1 of 16
Download to read offline
Android Application Development
Workshop

Day 1
Borhan Otour
Hello World , this is Android 
Agenda
What we will cover today
•The Android System and the Android SDK
• Preparing for the party (Android Installation)
•Building the first Application
1.
2.
3.
4.

Create a new Android project (project structure)
Launch the Android Application (AVDs)
Create a simple view (Views and Resource systems)
Connecting to another activity (Intent system)
The Android System Architecture
The Android Market and Activations
By 2013 , there were

Android Device Activated.
SO THERE IS A LOT OF PEOPLE WHO NEEDS
APPS FROM YOU.
The Installation
•What do you need to prepare the development environment?
1. The Android SDK
2. An editor to code your project or The Integrated
Development Environment (Eclipse IDE)
3. Connect the IDE and the SDK to begin developing for the
Android market  (Android developer tool ADT)
• ( SDK + Eclipse )* ADT = My Android Development Environment
• Remember:
SDK = Android development tools + Android application framework
Building the first application (AVDs)
•The Android Virtual Device (The Emulator)

Note: The API levels (The SDK versions)
The project structure
What is important are two
main directories and an xml
file :
1. src/
2. res/
3. AndroidManifest.xml
Android Application development
(create a simple layout)
The activity:
the most important Android application component.
It’s a java class that represent a Screen.
Each application must contain one screen .

This is an Activity
Note: The activity is not a layout
Android Application development
(create a simple layout) .cont
The view:
The view is the fundamental component you see in the
“screen” that is used to build layouts.
The views can be containers or a widgets.
Android Application development
(create a simple layout) .cont
•The layout is composed of a hierarchy of views

•You can assign a view to an activity by using the
following instruction
- setContentView(View view|ViewId);
Android Application development
(create a simple layout) .cont
• The layouts in Android application follows a
hierarchical manner , and the best way to represents
hierarchies in the code is to use XML. (see the next slide)
• To reach a layout resource (like a button)in the code, I
need to (1) assign an ID to that resource :
@+id/identifier , (2) in the code I can reach the layout
resource using the
findViewById(R.id. identifier) Activity method
• Note: More about resources and layout will be
covered in Day 2 in the workshop.
The activity_main.xml file that represents the layout of the MainActivity.java
Interconnection between activities
(The Intent system)
Activity 1

Activity 2

• When you want to launch a new Activity from the current Activity
you need to use Intents.
• The Intent represents the Application Intention to do something,
which is (launching a new “Screen”) .
• You specifies the current Activity and the name of the Destination
Activity in the construction of intent object.
Intent intent = new Intent(this , destinationActivityName.class)
• You can put extra content in the message that you send to launch a
new Activity.
Intent.putExtras( String key , value);
Interconnection between activities
(The Intent system) .cont
• To launch the new Activity from the current activity use the
Activity method:
startActivity(Intent intent)
• To get the Intent object that caused the activity to be launched:
In the destination Activity , use the activity method:
getIntent()
• To extract the extra data from the intent based of the type of data
( like String data for instance ) : intent.getStringExtras(String key)
References
•http://developer.android.com/index.html
•The API documentation
http://developer.android.com/reference/packages.html

• Building the first application
http://developer.android.com/training/basics/firstapp/index
.html

More Related Content

What's hot

Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
Android application-component
Android application-componentAndroid application-component
Android application-componentLy Haza
 
Get an Android tutorial for beginners
Get an Android tutorial for beginnersGet an Android tutorial for beginners
Get an Android tutorial for beginnersJavaTpoint.Com
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structureVyara Georgieva
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentRaman Pandey
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
 
Android development orientation for starters v4 seminar
Android development orientation for starters v4   seminarAndroid development orientation for starters v4   seminar
Android development orientation for starters v4 seminarJoemarie Amparo
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialkatayoon_bz
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialEd Zel
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 

What's hot (20)

Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
Get an Android tutorial for beginners
Get an Android tutorial for beginnersGet an Android tutorial for beginners
Get an Android tutorial for beginners
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
 
Training android
Training androidTraining android
Training android
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017
 
Android components
Android componentsAndroid components
Android components
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Android development orientation for starters v4 seminar
Android development orientation for starters v4   seminarAndroid development orientation for starters v4   seminar
Android development orientation for starters v4 seminar
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 

Similar to Android App Development Workshop Day 1 Agenda

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1Borhan Otour
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentAhsanul Karim
 
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
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewAhsanul Karim
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting StartedHemant Chhapoliya
 
Session 2 prepare android development environment
Session 2   prepare android development environmentSession 2   prepare android development environment
Session 2 prepare android development environmentAdham Enaya
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.Sandeep Londhe
 
Android developer interview questions with answers pdf
Android developer interview questions with answers pdfAndroid developer interview questions with answers pdf
Android developer interview questions with answers pdfazlist247
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 

Similar to Android App Development Workshop Day 1 Agenda (20)

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application Development
 
ANDROID PPT 1.pdf
ANDROID PPT 1.pdfANDROID PPT 1.pdf
ANDROID PPT 1.pdf
 
Android session 1
Android session 1Android session 1
Android session 1
 
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
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick Overview
 
Android
Android Android
Android
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Notes Unit3.pptx
Notes Unit3.pptxNotes Unit3.pptx
Notes Unit3.pptx
 
Session 2 prepare android development environment
Session 2   prepare android development environmentSession 2   prepare android development environment
Session 2 prepare android development environment
 
Android Basic- CMC
Android Basic- CMCAndroid Basic- CMC
Android Basic- CMC
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Android
AndroidAndroid
Android
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
 
Android developer interview questions with answers pdf
Android developer interview questions with answers pdfAndroid developer interview questions with answers pdf
Android developer interview questions with answers pdf
 
Android studio
Android studioAndroid studio
Android studio
 

Recently uploaded

4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Recently uploaded (20)

4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

Android App Development Workshop Day 1 Agenda

  • 2. Hello World , this is Android 
  • 3. Agenda What we will cover today •The Android System and the Android SDK • Preparing for the party (Android Installation) •Building the first Application 1. 2. 3. 4. Create a new Android project (project structure) Launch the Android Application (AVDs) Create a simple view (Views and Resource systems) Connecting to another activity (Intent system)
  • 4. The Android System Architecture
  • 5. The Android Market and Activations By 2013 , there were Android Device Activated. SO THERE IS A LOT OF PEOPLE WHO NEEDS APPS FROM YOU.
  • 6. The Installation •What do you need to prepare the development environment? 1. The Android SDK 2. An editor to code your project or The Integrated Development Environment (Eclipse IDE) 3. Connect the IDE and the SDK to begin developing for the Android market  (Android developer tool ADT) • ( SDK + Eclipse )* ADT = My Android Development Environment • Remember: SDK = Android development tools + Android application framework
  • 7. Building the first application (AVDs) •The Android Virtual Device (The Emulator) Note: The API levels (The SDK versions)
  • 8. The project structure What is important are two main directories and an xml file : 1. src/ 2. res/ 3. AndroidManifest.xml
  • 9. Android Application development (create a simple layout) The activity: the most important Android application component. It’s a java class that represent a Screen. Each application must contain one screen . This is an Activity Note: The activity is not a layout
  • 10. Android Application development (create a simple layout) .cont The view: The view is the fundamental component you see in the “screen” that is used to build layouts. The views can be containers or a widgets.
  • 11. Android Application development (create a simple layout) .cont •The layout is composed of a hierarchy of views •You can assign a view to an activity by using the following instruction - setContentView(View view|ViewId);
  • 12. Android Application development (create a simple layout) .cont • The layouts in Android application follows a hierarchical manner , and the best way to represents hierarchies in the code is to use XML. (see the next slide) • To reach a layout resource (like a button)in the code, I need to (1) assign an ID to that resource : @+id/identifier , (2) in the code I can reach the layout resource using the findViewById(R.id. identifier) Activity method • Note: More about resources and layout will be covered in Day 2 in the workshop.
  • 13. The activity_main.xml file that represents the layout of the MainActivity.java
  • 14. Interconnection between activities (The Intent system) Activity 1 Activity 2 • When you want to launch a new Activity from the current Activity you need to use Intents. • The Intent represents the Application Intention to do something, which is (launching a new “Screen”) . • You specifies the current Activity and the name of the Destination Activity in the construction of intent object. Intent intent = new Intent(this , destinationActivityName.class) • You can put extra content in the message that you send to launch a new Activity. Intent.putExtras( String key , value);
  • 15. Interconnection between activities (The Intent system) .cont • To launch the new Activity from the current activity use the Activity method: startActivity(Intent intent) • To get the Intent object that caused the activity to be launched: In the destination Activity , use the activity method: getIntent() • To extract the extra data from the intent based of the type of data ( like String data for instance ) : intent.getStringExtras(String key)
  • 16. References •http://developer.android.com/index.html •The API documentation http://developer.android.com/reference/packages.html • Building the first application http://developer.android.com/training/basics/firstapp/index .html