Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaticPrakash authored Apr 1, 2020
1 parent 9636cee commit 8f58e8c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Broadcast-Receiver
This repo contains implementation of various Broadcast Receiver(like Screen On/Off, Device lock/unlock, Headphone plugged in/out, Wifi enabled/disabled/connected/disconnected, Bluetooth enabled/disbaled/connected/disconnected and much more) in a very modular and simpler way.

## Purpose :-

To understand the code of each Broadcast Receiver or just simply Ctrl+c and Ctrl+v to use it in your project.

## Broadcast Receiver available :-

1. Boot Completed
2. Screen Off
3. Screen On
4. Device Unlocked
5. Device locked
6. Power Source is connected(Charging)
7. Power Source is disconnected(Discharging)
8. Batter Low
9. Earphone plugged in/Out
10. Internet is connected
11. Bluetooth Turning On/Off
12. Bluetooth On/Off
13. Bluetooth Connected/Disconnected(Even shows the name of the device to which it is connected, or from disconnected)
14. GPS is On
15. GPS is off
16. Wifi Enabled/Disbaled
17. Wifi Connected/Disconnected
18. Wifi Enabled but not connected


### Dependencies :-
Neither any extra dependency nor any third party module is required.


## Description :-

All these above mentioned Broadcast Receivers gets triggered whenever those events happen, I have put Toast and Logcat messages when the get triggered but you can replace them with whatever you want to do, like Changing wallpaper whenever your phone is charging, or like launching something when battery is low, or play some sound whenever bluetooth gets connected and much more. All these infinite possibilities are there you can make whatever you want.


## Bugs and Improvements :-
No bugs.
However, as multiple Toast messages will overlap each other so, you might not see toast messages in proper order. But as code is completely valid and sequential, so you will get correct result in logcat. And if you replace these Toasts and logcat messages with your own action you will not face any problem. It's just Toasts aren't reliable when used in bulk.


# Dev :- Prakash Gupta

0 comments on commit 8f58e8c

Please sign in to comment.