Hey @spammedeeper I wanted to ping you on this one because I believe I found a solution to hot starting the DirecTV app while recovering from a bad deep link.
Starting it with "am start -W -n com.att.tv/com.clientapp.MainActivity" allows it to recover from that bad state. So using that in a config seems to be pretty reliable and it brings tuning time down to four to five seconds once the app has been started.
I wrote a config here dynamically adjusting to the package name and resolving the main activity dynamically. The idea being that if the package name changes unlikely or if the name of the main activity were to change it should resolve it rather than us having to change the config.
{
"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": [],
"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_tune_commands": [
"input keyevent KEYCODE_MEDIA_STOP",
"input keyevent KEYCODE_MEDIA_PAUSE",
"input keyevent KEYCODE_HOME"
]
}
Regardless, I forced a bad deep link a couple of times and used the regular command to bring it into that bad state and then multiple times ran this command and it brought it right back. The only interesting thing is if you take the remote for Android box and back out of the show while it's streaming to Channels, the app is sort of in a weird broken state. But tuning and streaming a channel works perfectly and it's near instant.
I'm curious what you think and if you'd be interested in testing it out, letting me know if you think it's reliable.