SlideShare a Scribd company logo
Intents and 
PendingIntents 
Android Application Development
What is Intent in Android? 
Intents are the standard messaging mechanism 
in Android that express the user’s intention to 
perform some work. 
They allow you to interact with other 
components defined by you or by the Android 
Operating System.
Examples: 
● When you send a message. 
● When you start the camera. 
● When you dial a phone number. 
● When you start a service. 
● When you lunch an activity.
Intents’re used in both ways 
● To call a component by you. 
● To notify you of some events by the system.
How to create an intent? 
● Create the intent. 
● Add intent options. 
● Run the intent.
Pending Intent 
A PendingIntent is a token that you give to a 
foreign application which allows the foreign to 
use you application’s permissions to execute a 
predefined piece of code.
Examples: 
● Notification Manager 
● AlarmManager 
● AppWidgetManager 
● Home Screen
Other differences... 
● Regular Intent : does not require pending 
intent to be created 
● Pending Intent : Requires a regular intent to 
be created.
Types of Intents 
TupRTypesTT 
Implicit Intent that doesn’t specify the 
component. 
Example: 
Intent intent = new Intent( Intent.ACTION_VIEW); 
intent.setData(Uri.parse(“__________”)); 
startActivity(intent);
Types of Intents 
Explicit intents specifies the component. 
Example: 
Intent i = new Intent(getApplicationContext(), 
Activitytwo.class); 
StartActivity(i);

More Related Content

Similar to Intents and PendingIntents in Android application development

Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
Headerlabs Infotech Pvt. Ltd.
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
Sheetal Sharma
 
Android App Development 07 : Intent & Share
Android App Development 07 : Intent & ShareAndroid App Development 07 : Intent & Share
Android App Development 07 : Intent & ShareAnuchit Chalothorn
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
Germán Bringas
 
Android interview questions and answers
Android interview questions and answersAndroid interview questions and answers
Android interview questions and answers
kavinilavuG
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
34ShreyaChauhan
 
Event driven theory
Event driven theoryEvent driven theory
Event driven theory
nickywalters
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Raman Pandey
 
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Itvedant
 
Key Services in the Application Framework.pdf
Key Services in the Application Framework.pdfKey Services in the Application Framework.pdf
Key Services in the Application Framework.pdf
Mike Brown
 
Android application-component
Android application-componentAndroid application-component
Android application-component
Ly Haza
 
3-Implicit Intents.pptx
3-Implicit Intents.pptx3-Implicit Intents.pptx
3-Implicit Intents.pptx
ab2478037
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
Tharaka Devinda
 
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
azlist247
 
Android notifications. testing guideline
Android notifications. testing guidelineAndroid notifications. testing guideline
Android notifications. testing guideline
TechMagic
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Topic # 12 of outline Configuring Local Services.pptx
Topic # 12 of outline Configuring Local Services.pptxTopic # 12 of outline Configuring Local Services.pptx
Topic # 12 of outline Configuring Local Services.pptx
AyeCS11
 
Security on android
Security on androidSecurity on android
Security on androidpk464312
 
Intent.ppt
Intent.pptIntent.ppt
Developing for Android Wear - Part 1
Developing for Android Wear - Part 1Developing for Android Wear - Part 1
Developing for Android Wear - Part 1Justin Munger
 

Similar to Intents and PendingIntents in Android application development (20)

Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
 
Android App Development 07 : Intent & Share
Android App Development 07 : Intent & ShareAndroid App Development 07 : Intent & Share
Android App Development 07 : Intent & Share
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Android interview questions and answers
Android interview questions and answersAndroid interview questions and answers
Android interview questions and answers
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
 
Event driven theory
Event driven theoryEvent driven theory
Event driven theory
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
 
Key Services in the Application Framework.pdf
Key Services in the Application Framework.pdfKey Services in the Application Framework.pdf
Key Services in the Application Framework.pdf
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
3-Implicit Intents.pptx
3-Implicit Intents.pptx3-Implicit Intents.pptx
3-Implicit Intents.pptx
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
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 notifications. testing guideline
Android notifications. testing guidelineAndroid notifications. testing guideline
Android notifications. testing guideline
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Topic # 12 of outline Configuring Local Services.pptx
Topic # 12 of outline Configuring Local Services.pptxTopic # 12 of outline Configuring Local Services.pptx
Topic # 12 of outline Configuring Local Services.pptx
 
Security on android
Security on androidSecurity on android
Security on android
 
Intent.ppt
Intent.pptIntent.ppt
Intent.ppt
 
Developing for Android Wear - Part 1
Developing for Android Wear - Part 1Developing for Android Wear - Part 1
Developing for Android Wear - Part 1
 

More from MaryadelMar85

gvSIG visualización y navegación
gvSIG visualización y navegacióngvSIG visualización y navegación
gvSIG visualización y navegación
MaryadelMar85
 
gvSIG: Proyectos y Documentos
gvSIG: Proyectos y DocumentosgvSIG: Proyectos y Documentos
gvSIG: Proyectos y Documentos
MaryadelMar85
 
Conceptos Básicos en gvSIG
Conceptos Básicos en gvSIGConceptos Básicos en gvSIG
Conceptos Básicos en gvSIG
MaryadelMar85
 
Definición e Instalación de gvSIG
Definición e Instalación de gvSIGDefinición e Instalación de gvSIG
Definición e Instalación de gvSIG
MaryadelMar85
 
android:versionName and android:versionCode
android:versionName and  android:versionCodeandroid:versionName and  android:versionCode
android:versionName and android:versionCode
MaryadelMar85
 
Eclipse in Android. 3 common issues.
Eclipse in Android. 3 common issues.Eclipse in Android. 3 common issues.
Eclipse in Android. 3 common issues.
MaryadelMar85
 
Database in Android
Database in AndroidDatabase in Android
Database in Android
MaryadelMar85
 

More from MaryadelMar85 (7)

gvSIG visualización y navegación
gvSIG visualización y navegacióngvSIG visualización y navegación
gvSIG visualización y navegación
 
gvSIG: Proyectos y Documentos
gvSIG: Proyectos y DocumentosgvSIG: Proyectos y Documentos
gvSIG: Proyectos y Documentos
 
Conceptos Básicos en gvSIG
Conceptos Básicos en gvSIGConceptos Básicos en gvSIG
Conceptos Básicos en gvSIG
 
Definición e Instalación de gvSIG
Definición e Instalación de gvSIGDefinición e Instalación de gvSIG
Definición e Instalación de gvSIG
 
android:versionName and android:versionCode
android:versionName and  android:versionCodeandroid:versionName and  android:versionCode
android:versionName and android:versionCode
 
Eclipse in Android. 3 common issues.
Eclipse in Android. 3 common issues.Eclipse in Android. 3 common issues.
Eclipse in Android. 3 common issues.
 
Database in Android
Database in AndroidDatabase in Android
Database in Android
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Intents and PendingIntents in Android application development

  • 1. Intents and PendingIntents Android Application Development
  • 2. What is Intent in Android? Intents are the standard messaging mechanism in Android that express the user’s intention to perform some work. They allow you to interact with other components defined by you or by the Android Operating System.
  • 3. Examples: ● When you send a message. ● When you start the camera. ● When you dial a phone number. ● When you start a service. ● When you lunch an activity.
  • 4. Intents’re used in both ways ● To call a component by you. ● To notify you of some events by the system.
  • 5. How to create an intent? ● Create the intent. ● Add intent options. ● Run the intent.
  • 6. Pending Intent A PendingIntent is a token that you give to a foreign application which allows the foreign to use you application’s permissions to execute a predefined piece of code.
  • 7. Examples: ● Notification Manager ● AlarmManager ● AppWidgetManager ● Home Screen
  • 8. Other differences... ● Regular Intent : does not require pending intent to be created ● Pending Intent : Requires a regular intent to be created.
  • 9. Types of Intents TupRTypesTT Implicit Intent that doesn’t specify the component. Example: Intent intent = new Intent( Intent.ACTION_VIEW); intent.setData(Uri.parse(“__________”)); startActivity(intent);
  • 10. Types of Intents Explicit intents specifies the component. Example: Intent i = new Intent(getApplicationContext(), Activitytwo.class); StartActivity(i);