Profile to test whether *any* app has been opened.

26 views
Skip to first unread message

Soudane GMTA

unread,
Nov 28, 2021, 4:18:56 PM11/28/21
to Tasker
I know how to create a context which detects whether one or more specified apps have been opened. However, I'd like to write a context which detects whether any app has been opened.

I guess I could select each and every app when initializing the context, but then it will become outdated if I happen to download any new apps. I'm looking for a way to detect the opening of any app, without my having to specify a list of apps initially.

Is this possible in Tasker?

Thank you in advance.

Soudane GMTA

unread,
Nov 28, 2021, 4:32:36 PM11/28/21
to Tasker
PS: Unless I'm mistaken, the "New Window" event could detect this. However, the problem is that it also seems to detect things like toast popups and possibly other windows that are opened in non-app-launching scenarios. I'm looking for a way to detect *only* the launching of an app (any app), and not the displaying of any other kinds of windows.

Robert Ryan

unread,
Nov 28, 2021, 4:43:01 PM11/28/21
to tas...@googlegroups.com, Soudane GMTA
The App Changed event context is probably what you are looking for. Example:

    Profile: Track App
    Settings: Restore: no
     Event: App Changed [ Output Variables:* Package:* ]
    
    Enter Task: Anon
    
    A1: Variable Set [
         Name: %AppName
         To: %app_name
         Max Rounding Digits: 3 ]
    
    

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/15c9c9b6-7e8c-4bc5-8797-e619d0fc1b8cn%40googlegroups.com.

Soudane GMTA

unread,
Nov 28, 2021, 6:50:26 PM11/28/21
to Tasker

Thank you very much. I mistakenly thought that "App Changed" meant that the state of an app has changed, but now I realize that it means that the current foreground app has changed to another app ... which is exactly what I want.
Reply all
Reply to author
Forward
0 new messages