Post
by vertigo » 18 May 2020 04:06
I've been doing a bunch of testing with this and have learned a couple things which have changed the requirements. First, removing the notification with Automagic somehow resets the counter, so if I use trigger "App Task Started: third-party dialer" with a condition to check if the missed call notification is there and remove it, that's all that's needed. The problem is resetting the counter if I tap on the notification, since doing so removes it, so I can no longer have Automagic remove it. The notification belongs to Call Management (com.android.server.telecom), so I tried using that every possible way in "Launch App" and "Start Activity" but couldn't get it to work. I thought maybe the counter was stored in a system variable, so I used the settings logger to check, but it's not. I tried using the notification removal as a trigger to launch the stock dialer, then launch the third-party dialer, but it turns out the stock dialer only resets the count if it's opened to the call log screen, but it opens by default to the favorites screen and there's no option to change the default screen and I tried all the different class names and none of them opened it to the call log screen.
So the only way I can think of to make it work is to keep the stock dialer set as the default phone app, so clicking the missed calls notification launches it instead of the third-party dialer, and when it does it opens it to the call log screen automatically (indicating that it's clearly possible, so I feel like there must be a way to do it). The problem with that is then it's in the recent tasks, since I'm not launching it with the exclude_from_recents flag. That means that unless I can figure out how to get it to open to the call log screen, I need to figure out how to swipe it from recents (as I said before, I can swipe or hit the x button, but I noticed it takes a second or two for the x buttons to show). I prefer not to use the control UI action if possible, since it's less predictable, can cause a problem if I try to tap or swipe when it starts doing its thing, and isn't as seamless.
So any thoughts on how to launch the stock dialer on its call log screen? If not, I could use help figuring out how to swipe it out (Moto Z Play).
Edit: I used the overlay control to record the swipe gesture, but no matter what I try (very short to very long duration, very short to very long swipe length), it doesn't work. With a short duration, nothing appears to happen. With a long duration, the app is slowly slid to the side then released, so it's not swiped off screen and therefore not closed.