SlideShare a Scribd company logo
1 of 2
Download to read offline
Android question:
Suppose you have two applications, A and B. App A is responsible for broadcasting a value
representing a mark to App B, as shown below.
Application A
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onSendBroadcastClick(View view){
Intent intent=new Intent();
intent.setAction("WEEK");
intent.putExtra("total_mark",5);
sendBroadcast(intent);
}
}
Application B
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// your code here
}
}
class BroadcastReceiver {
// your code here
}
The class 'BroadcastReceiver' is the broadcast receiver responsible for receiving the broadcast of
App A and showing it in a Toast.
Your task is to complete the implementation of App B ( see lines 6 and 11)

More Related Content

Similar to Android questionSuppose you have two applications, A and B. App A.pdf

BroadcastReceivers in Android
BroadcastReceivers in AndroidBroadcastReceivers in Android
BroadcastReceivers in AndroidPerfect APK
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介easychen
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in androidAngelo Rüggeberg
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxkarthikaparthasarath
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersJiaxuan Lin
 
Answer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfAnswer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfankitcomputer11
 
android level 3
android level 3android level 3
android level 3DevMix
 
Android broadcast receiver tutorial
Android broadcast receiver   tutorialAndroid broadcast receiver   tutorial
Android broadcast receiver tutorialmaamir farooq
 
Android broadcast receiver tutorial
Android broadcast receiver  tutorialAndroid broadcast receiver  tutorial
Android broadcast receiver tutorialmaamir farooq
 
Developing for android wear
Developing for android wearDeveloping for android wear
Developing for android wearThomas Oldervoll
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Alfredo Morresi
 
Android Wear – IO Extended
Android Wear – IO ExtendedAndroid Wear – IO Extended
Android Wear – IO ExtendedDouglas Drumond
 

Similar to Android questionSuppose you have two applications, A and B. App A.pdf (20)

BroadcastReceivers in Android
BroadcastReceivers in AndroidBroadcastReceivers in Android
BroadcastReceivers in Android
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
 
Simplest calculator app using android studio android workshop
Simplest calculator app using android studio   android workshopSimplest calculator app using android studio   android workshop
Simplest calculator app using android studio android workshop
 
DAY2.pptx
DAY2.pptxDAY2.pptx
DAY2.pptx
 
Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docx
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
 
Answer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfAnswer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdf
 
android level 3
android level 3android level 3
android level 3
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
 
List view languages
List view languagesList view languages
List view languages
 
Android wear (coding)
Android wear (coding)Android wear (coding)
Android wear (coding)
 
Android broadcast receiver tutorial
Android broadcast receiver   tutorialAndroid broadcast receiver   tutorial
Android broadcast receiver tutorial
 
Android broadcast receiver tutorial
Android broadcast receiver  tutorialAndroid broadcast receiver  tutorial
Android broadcast receiver tutorial
 
Developing for android wear
Developing for android wearDeveloping for android wear
Developing for android wear
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)
 
Practical
PracticalPractical
Practical
 
Android Wear – IO Extended
Android Wear – IO ExtendedAndroid Wear – IO Extended
Android Wear – IO Extended
 

More from ambritgames

Answer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfAnswer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfambritgames
 
answer all subquestions Consider the following version of Mundell.pdf
answer all subquestions  Consider the following version of Mundell.pdfanswer all subquestions  Consider the following version of Mundell.pdf
answer all subquestions Consider the following version of Mundell.pdfambritgames
 
Answer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfAnswer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfambritgames
 
Answer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfAnswer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfambritgames
 
answer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfanswer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfambritgames
 
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfAnson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfambritgames
 
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfAns - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfambritgames
 
Another assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfAnother assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfambritgames
 
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfanet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfambritgames
 
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfAnnika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfambritgames
 
Anne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfAnne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfambritgames
 
animation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdfanimation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdfambritgames
 
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfAnalice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfambritgames
 
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfAlthough Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfambritgames
 
Although their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfAlthough their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfambritgames
 
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfAm�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfambritgames
 
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfAmazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfambritgames
 
Also submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfAlso submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfambritgames
 
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfAlrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfambritgames
 
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfAlquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfambritgames
 

More from ambritgames (20)

Answer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfAnswer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdf
 
answer all subquestions Consider the following version of Mundell.pdf
answer all subquestions  Consider the following version of Mundell.pdfanswer all subquestions  Consider the following version of Mundell.pdf
answer all subquestions Consider the following version of Mundell.pdf
 
Answer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfAnswer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdf
 
Answer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfAnswer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdf
 
answer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfanswer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdf
 
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfAnson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
 
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfAns - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
 
Another assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfAnother assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdf
 
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfanet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
 
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfAnnika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
 
Anne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfAnne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdf
 
animation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdfanimation.#include windows.h#include GLglut.h#inclu.pdf
animation.#include windows.h#include GLglut.h#inclu.pdf
 
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfAnalice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
 
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfAlthough Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
 
Although their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfAlthough their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdf
 
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfAm�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
 
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfAmazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
 
Also submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfAlso submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdf
 
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfAlrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
 
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfAlquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
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
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
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
 
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
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Android questionSuppose you have two applications, A and B. App A.pdf

  • 1. Android question: Suppose you have two applications, A and B. App A is responsible for broadcasting a value representing a mark to App B, as shown below. Application A public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void onSendBroadcastClick(View view){ Intent intent=new Intent(); intent.setAction("WEEK"); intent.putExtra("total_mark",5); sendBroadcast(intent); } } Application B public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // your code here } } class BroadcastReceiver { // your code here } The class 'BroadcastReceiver' is the broadcast receiver responsible for receiving the broadcast of App A and showing it in a Toast.
  • 2. Your task is to complete the implementation of App B ( see lines 6 and 11)