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

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 

Recently uploaded (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

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)