SlideShare ist ein Scribd-Unternehmen logo
1 von 10
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);

Weitere ähnliche Inhalte

Ähnlich wie Intents and PendingIntents in Android application development

Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in ChandigarhSheetal 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 TutorialGermán Bringas
 
Android interview questions and answers
Android interview questions and answersAndroid interview questions and answers
Android interview questions and answerskavinilavuG
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx34ShreyaChauhan
 
Event driven theory
Event driven theoryEvent driven theory
Event driven theorynickywalters
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentRaman 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.pdfMike Brown
 
Android application-component
Android application-componentAndroid application-component
Android application-componentLy Haza
 
3-Implicit Intents.pptx
3-Implicit Intents.pptx3-Implicit Intents.pptx
3-Implicit Intents.pptxab2478037
 
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 notifications. testing guideline
Android notifications. testing guidelineAndroid notifications. testing guideline
Android notifications. testing guidelineTechMagic
 
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.pptxAyeCS11
 
Security on android
Security on androidSecurity on android
Security on androidpk464312
 
Developing for Android Wear - Part 1
Developing for Android Wear - Part 1Developing for Android Wear - Part 1
Developing for Android Wear - Part 1Justin Munger
 

Ähnlich wie 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
 

Mehr von MaryadelMar85

gvSIG visualización y navegación
gvSIG visualización y navegacióngvSIG visualización y navegación
gvSIG visualización y navegaciónMaryadelMar85
 
gvSIG: Proyectos y Documentos
gvSIG: Proyectos y DocumentosgvSIG: Proyectos y Documentos
gvSIG: Proyectos y DocumentosMaryadelMar85
 
Conceptos Básicos en gvSIG
Conceptos Básicos en gvSIGConceptos Básicos en gvSIG
Conceptos Básicos en gvSIGMaryadelMar85
 
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 gvSIGMaryadelMar85
 
android:versionName and android:versionCode
android:versionName and  android:versionCodeandroid:versionName and  android:versionCode
android:versionName and android:versionCodeMaryadelMar85
 
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
 

Mehr von 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
 

Kürzlich hochgeladen

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

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);