• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Tasker Application Context does not recognize Recents Button action

famgadget

Newbie
Jan 22, 2017
10
2
I am using Tasker to ensure a specific app (App A) is always in the foreground. If App A is not in the foreground, I Display a Scene that offers a time period before App A is relaunched. The Project works great EXCEPT if the Recents Button is tapped. Tasker is not recognizing that App A is no longer in the foreground and that the Recents Screen is now in the foreground.

Additional info..As soon as one of the apps listed on the Recents Screen is touched, the Tasker trigger executes, EXCEPT if the app is something like Kindle. Kindle pops up a page reader if reading a page, Tasker does not recognize that pop up page as an app and does not trigger the Context. Is this scenario, or if no Recent Apps are tapped, App A is never relaunched.

Is there any way to get Tasker to recognize that the Recents Screen is in the foreground?
 
The recents display is not an appin the foreground it is an overlay.

I have a simple profile is triggered by a specific app. It has a Beep and Flash on enter task and exit task.

I monitor the Calendar app.
If I load Calendar it shows I entered Calendar.
If I then load Calculator it shows I exited Calendar.
If I then select Calendar in the recents display it shows I entered Calendar.
If I then select Calculator in the recents display it shows I exited Calendar.

(I was confused for a while about Invert.
I thought App + Invert would trigger on any app other than the one selected.
It actually doesn't.
For the monitored app if Invert is set
on entry the exit task is launched
on exit the enter task is launched.)

... Thom
 
Last edited:
Upvote 0
Ahh, that makes sense and explains the behavior. My Tasker Project works very similar to your example above, and works well. And yes, most of time when the apps that are displayed on the resents display are selected, the App Context/Profile is triggered fine. Tapping the home button triggers the relaunch task fine as well.

But here is the issue;
The tablet is for my 92 year old dad that is not very technical. So I need to be sure App A is in the foreground as it provides a number of services to him through a special UI. So if he taps the recents button and the recents overlay is displayed, or if he taps the Kindle App via the recents overlay, the App Context/Profile is never triggered. It appears Kindle uses a reading pane overlay as well). So if he walks away, or falls asleep, with the Kindle app overlay being displayed, or the recents overlay, App A will never relaunch (and it needs to).

Tasker still thinks App A is active when recents overlay is displayed, so I don't think any App triggers will help. So I think I need a way to identify when that overlay is displayed, (that would be perfect). Or when the recents button is tapped. Or some other way to trigger the relaunch task if there is an overlay.

Any ides would be great, I really appreciate your time.

Thank you
 
Upvote 0
Thom.... Thanks for thinking out side the box. I didn't even know about that "Exclude From Recent Apps" setting. That is a great solution, I created an App with that setting and replaced the Kindle icon on the home screen. Works great.....

I guess to be able to trigger off the Recents Display Overlay, I would probably need to Root the device. If you have any ideas about doing that, free free to let me know.

Thanks again, you are awesome...
 
  • Like
Reactions: Thom
Upvote 0
You might want to use "Always start new copy".

Here is the Profile I mentioned. If you run it a while and play with manipulating things in the Recent Apps list you will conclude that what you are trying to do might work with Exit tasks.

Profile: Sample (243)
Application: Calculator
Enter: SampleEnter (732)
A1: Flash [ Text:< enter > Long:Off ]
A2: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]
Exit: SampleExit (733)
A1: Flash [ Text:< exit > Long:Off ]
A2: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]

... Thom
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones