So, keyevent 126 is "Play". The inverse of stop. There is also play/pause. I'm watching ADB and it does register.
Tasker doesn't work, but sending the key event using my shell script does. So I'm gonna watch On Patrol Live tonight and see if I get the prompt. That's a three hour show and I'm watching the pre-show before it.
{
"name": "DirecTV",
"author": "David B.",
"version": "1.0.0",
"description": "Fast tuning for DirecTV.",
"uuid": "3c7d5a19-6f2e-4b8a-9d3f-8e1c4b7a5f92",
"global_options": {
"wait_for_video_playback_detection": true,
"use_fixed_delay": false,
"fixed_delay_seconds": 0,
"check_for_and_clear_whos_watching_prompts": false,
"wait_after_post_playback_start_commands_seconds": 0
},
"pre_tune_commands": [
"pkill -9 -f DTVKEEPALIVE || true"
],
"tune_commands": [
"am start -W -n '||TARGET_PACKAGE_NAME||'/$(cmd package resolve-activity -a android.intent.action.MAIN '||TARGET_PACKAGE_NAME||' | awk -F= '/name=/{print $2; exit}') -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||'"
],
"post_playback_start_commands": [
"(trap '' HUP; exec -a DTVKEEPALIVE sh -c 'while true; do input keyevent 126; sleep 3600; done') </dev/null >/dev/null 2>&1 &"
],
"post_tune_commands": [
"pkill -9 -f DTVKEEPALIVE || true",
"input keyevent KEYCODE_MEDIA_STOP",
"input keyevent KEYCODE_HOME"
]
}
Try this one. It actually hits play, which is a media key, and should tell them we're alive, basically. That's what I'm thinking.
I can see it register in the command prompt.
Regardless, I just got cheap Osprey boxes on eBay instead of messing with this. Seems like they're just going to be way more reliable since they're purpose built. Hopefully this works for someone else though and I'll see in a few hours.