Last active
August 19, 2020 04:07
-
-
Save ramiloif/7f42087badfe9dcf44497bcb8d15f560 to your computer and use it in GitHub Desktop.
Make the broadcast receiver to receive a missed or answered call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phoneNumber=$1 | |
echo Faking answered call to $phoneNumber | |
adb shell am broadcast -a android.intent.action.PHONE_STATE --es state "RINGING" --es incoming_number $phoneNumber | |
adb shell am broadcast -a android.intent.action.PHONE_STATE --es state "OFFHOOK" --es incoming_number $phoneNumber | |
adb shell am broadcast -a android.intent.action.PHONE_STATE --es state "IDLE" --es incoming_number $phoneNumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phoneNumber=$1 | |
echo Faking missed call to $phoneNumber | |
adb shell am broadcast -a android.intent.action.PHONE_STATE --es state "RINGING" --es incoming_number $phoneNumber | |
adb shell am broadcast -a android.intent.action.PHONE_STATE --es state "IDLE" --es incoming_number $phoneNumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment