SlideShare a Scribd company logo
1 of 19
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 & DatabasesMuhammad 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.pdfssusere71a07
 
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 semaswinbiju1652
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentOwain Lewis
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in androidOum Saokosal
 
Android Application Components
Android Application ComponentsAndroid Application Components
Android Application ComponentsJAINAM KAPADIYA
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast ReceiverYong 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 creationSagar 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 creationRibily
 
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
 
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
 
m365_slides.pptx
m365_slides.pptxm365_slides.pptx
m365_slides.pptxadewad
 
05: The 5 App Metrics That Are Crucial To Your App's Success
05: The 5 App Metrics That Are Crucial To Your App's Success05: The 5 App Metrics That Are Crucial To Your App's Success
05: The 5 App Metrics That Are Crucial To Your App's SuccessLogan Merrick
 

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
 
m365_slides.pptx
m365_slides.pptxm365_slides.pptx
m365_slides.pptx
 
05: The 5 App Metrics That Are Crucial To Your App's Success
05: The 5 App Metrics That Are Crucial To Your App's Success05: The 5 App Metrics That Are Crucial To Your App's Success
05: The 5 App Metrics That Are Crucial To Your App's Success
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

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