Broadcast Receiver – Part 1, An Introduction

31
58



This is the first of the upcoming videos on broadcast receivers in Android. This video starts with the discussion on why would you need a broadcast receiver and then goes on to demonstrate a simple implementation of Broadcast Receiver, that will get triggered whenever an incoming SMS event happens in Android phone.

If the code doesn’t work, it’s because targetSDK is set to 23 which requires run time permissions to be implemented. To understand run time permissions please visit

Follow me on Twitter:

Demo Source code Github link :

Nguồn:https://quydinh.com/

31 COMMENTS

  1. my teacher give me a task like that..when car rach upto 60km per hour speed .calls,text or emails should respond automatically with a custom text.what should i learn now first broad cast or services bcz it depends uon both topics

  2. Can someone please give me a good and detailed explanation of when to use broadcast in Android? Why not use normal intents instead? I have seen my teacher use normal intents to go from one app to another. So when do we actually need Broadcast intents and receivers instead of just normal intents?

  3. Becarfull:
    Your app's target API level is 23, that is android M (6.0). In android M there are huge changes related to user-permissions. Here is nice article explaining the changes.

  4. This is not the case for real devices. A big percentage of mobile devices kill the app when removed from recent tasks. And puts app in stop state. Broadcast receivers are no longer able to receive any broadcasts. Until user manually launches the app from its icon. But i want to have a way. If you can help to get out of stop state if app is removed from recent tasks. Broadcast receivers dead. I dont want such behavior. Plz help me sir.

  5. There was a time when "Slidenerd" was the best. then topped by "Prabeesh R K". Now , you have topped them all. Brilliant work Sir.

  6. Hi Anil,your explanation is awesome and what ever you are taking steps ,same steps followed by me ,but My toast is not showing any thing ,and target sdk 22 also,in this case what should i do?please help me?

LEAVE A REPLY

Please enter your comment!
Please enter your name here