SlideShare a Scribd company logo
ANDROID TRAINING
SESSION – 3
-Hussain KMR Behestee
AGENDAS
• Intents
– Explicit Intents
– Implicit intents
• Broadcast Receivers
• Notifications & Toasts
EXPLICIT INTENTS
• We saw some Explicit Intents in previous
session.
• Today we will see few more, like as
– Start another activity
– Start another activity with sending data
– Start another activity for getting result
START ANOTHER ACTIVITY
• Start another activity
• Start another activity with sending data
• Receive data
START ANOTHER ACTIVITY FOR
GETTING RESULT
• Start activity to get result
• Callback
START ANOTHER ACTIVITY FOR
GETTING RESULT
• Send back to caller activity
• Please see here for details.
IMPLICIT INTENT
• Implicit intent are those which intents have no
specific activity to show. We will learn here-
– Call other app to share your content
– Allow other apps to start your activity
– Call other app to do a task
– Caution
CALL OTHER APP TO SHARE YOUR
CONTENT
• Initiating call-
• This will show all applications
which are registered for this type.
• To get registered to response you
have allow them.
ALLOW OTHER APP TO START YOUR
ACTIVITY
• Add Intent Filter to manifest
• Add mime type as much you want to register.
EXTRA
• Install apps to simulator
– adb install <file>
IMPLICIT INTENT: CAUTION
• Caution: If you invoke an intent and there is no app available on the device
that can handle the intent, your app will crash.
• To verify there is an activity available that can respond to the intent, call
queryIntentActivities() to get a list of activities capable of handling your
Intent. If the returned List is not empty, you can safely use the intent. For
example:
• Please see details at here.
CALL OTHER APP TO SHARE YOUR
CONTENT
• Safe call with create chooser
BROADCAST RECEIVERS
• A broadcast receiver is a component that
responds to system-wide Broadcast
announcements.
• Many broadcasts originate from the system
– For example, a Broadcast announcing that the
screen has turned off, the battery is low, or a
picture was captured or an SMS is received.
BROADCAST RECEIVERS
• Applications can also initiate broadcasts—for
example, to let other applications know that
some data has been downloaded to the
device and is available for them to use.
• Although broadcast receivers don't display a
user interface, they may create a status bar
notification to alert the user when a broadcast
event occurs.
BROADCAST RECEIVERS
• To receive a broadcast when SMS received
BROADCAST RECEIVERS
• In manifest
NOTIFICATION
• Toast Display
– Toast.makeText(context, str,Toast.LENGTH_LONG).show();
• Notification drawer
– On Next Session ;-)
QUESTION?
THANK YOU

More Related Content

Similar to Android session 3-behestee

Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
Muhammad Sajid
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
faiz324545
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
ssusere71a07
 
Ch5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetCh5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetShih-Hsiang Lin
 
android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last sem
aswinbiju1652
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Owain Lewis
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
Oum Saokosal
 
Broadcast receivers
Broadcast receiversBroadcast receivers
Broadcast receivers
maamir farooq
 
Android Application Components
Android Application ComponentsAndroid Application Components
Android Application Components
JAINAM KAPADIYA
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
Yong Heui Cho
 
Creating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creationCreating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creation
Sagar Kalkhair
 
Creating an app on Ribily Part 3 - flow creation
Creating an app on Ribily Part 3 - flow creationCreating an app on Ribily Part 3 - flow creation
Creating an app on Ribily Part 3 - flow creation
Ribily
 
Mobile Application Guideline | Mobile App Development Company
Mobile Application Guideline | Mobile App Development Company Mobile Application Guideline | Mobile App Development Company
Mobile Application Guideline | Mobile App Development Company
Arna Softech Private Limited
 
ANDROID
ANDROIDANDROID
ANDROID
DrMeftahZouai
 
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
shubh1112
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
Germán Bringas
 
m365_slides.pptx
m365_slides.pptxm365_slides.pptx
m365_slides.pptx
adewad
 

Similar to Android session 3-behestee (20)

Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Basics 4
Basics   4Basics   4
Basics 4
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
 
Ch5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetCh5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internet
 
Android_ver_01
Android_ver_01Android_ver_01
Android_ver_01
 
android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last sem
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
 
Broadcast receivers
Broadcast receiversBroadcast receivers
Broadcast receivers
 
Android Application Components
Android Application ComponentsAndroid Application Components
Android Application Components
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
 
Creating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creationCreating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creation
 
Creating an app on Ribily Part 3 - flow creation
Creating an app on Ribily Part 3 - flow creationCreating an app on Ribily Part 3 - flow creation
Creating an app on Ribily Part 3 - flow creation
 
Mobile Application Guideline | Mobile App Development Company
Mobile Application Guideline | Mobile App Development Company Mobile Application Guideline | Mobile App Development Company
Mobile Application Guideline | Mobile App Development Company
 
ANDROID
ANDROIDANDROID
ANDROID
 
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
DEVICE SECURITY(BE PROTECTED FROM LOAN MAFIAS)
 
Android intent
Android intentAndroid intent
Android intent
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
m365_slides.pptx
m365_slides.pptxm365_slides.pptx
m365_slides.pptx
 

Recently uploaded

Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 

Recently uploaded (20)

Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 

Android session 3-behestee

  • 1. ANDROID TRAINING SESSION – 3 -Hussain KMR Behestee
  • 2. AGENDAS • Intents – Explicit Intents – Implicit intents • Broadcast Receivers • Notifications & Toasts
  • 3. EXPLICIT INTENTS • We saw some Explicit Intents in previous session. • Today we will see few more, like as – Start another activity – Start another activity with sending data – Start another activity for getting result
  • 4. START ANOTHER ACTIVITY • Start another activity • Start another activity with sending data • Receive data
  • 5. START ANOTHER ACTIVITY FOR GETTING RESULT • Start activity to get result • Callback
  • 6. START ANOTHER ACTIVITY FOR GETTING RESULT • Send back to caller activity • Please see here for details.
  • 7. IMPLICIT INTENT • Implicit intent are those which intents have no specific activity to show. We will learn here- – Call other app to share your content – Allow other apps to start your activity – Call other app to do a task – Caution
  • 8. CALL OTHER APP TO SHARE YOUR CONTENT • Initiating call- • This will show all applications which are registered for this type. • To get registered to response you have allow them.
  • 9. ALLOW OTHER APP TO START YOUR ACTIVITY • Add Intent Filter to manifest • Add mime type as much you want to register.
  • 10. EXTRA • Install apps to simulator – adb install <file>
  • 11. IMPLICIT INTENT: CAUTION • Caution: If you invoke an intent and there is no app available on the device that can handle the intent, your app will crash. • To verify there is an activity available that can respond to the intent, call queryIntentActivities() to get a list of activities capable of handling your Intent. If the returned List is not empty, you can safely use the intent. For example: • Please see details at here.
  • 12. CALL OTHER APP TO SHARE YOUR CONTENT • Safe call with create chooser
  • 13. BROADCAST RECEIVERS • A broadcast receiver is a component that responds to system-wide Broadcast announcements. • Many broadcasts originate from the system – For example, a Broadcast announcing that the screen has turned off, the battery is low, or a picture was captured or an SMS is received.
  • 14. BROADCAST RECEIVERS • Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use. • Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs.
  • 15. BROADCAST RECEIVERS • To receive a broadcast when SMS received
  • 17. NOTIFICATION • Toast Display – Toast.makeText(context, str,Toast.LENGTH_LONG).show(); • Notification drawer – On Next Session ;-)