What Android 13 permissions are needed for Tasker to kill running apps?

229 views
Skip to first unread message

Soudane GMTA

unread,
Nov 18, 2023, 9:37:41 PM11/18/23
to Tasker
I have installed the latest Tasker beta onto a new phone that's running Android 13. I copied all my Tasker configuration including Profiles and Tasks from another Android 13 device.

On the older device, I managed to give Tasker permission to kill running apps, but I forgot what I did to enable this capability, and now I can't remember how to set this Android permission on the new device.

Does anyone know what Tasker permission I need to set in Android for Tasker to be able to kill running apps under Android 13?

Thank you very much in advance.

Soudane GMTA

unread,
Nov 19, 2023, 9:08:08 PM11/19/23
to Tasker
False alarm!  And I'm very sorry.

It turns out that there were some logic errors in a couple of my tasks, and the kill attempts of the foreground app were never even occurring.

Once I discovered this and fixed it, those foreground-app kills all started working properly.

So, nothing special is needed for that under Android 13.

Florian Denis

unread,
Nov 20, 2023, 4:36:49 AM11/20/23
to Tasker
Hello,
I tried to do the same thing, but i can't find the solution. Your phone is rooted ? if no, can you explain me how yo do the job ?

Thanks in advance,

Regards,

Soudane GMTA

unread,
Nov 20, 2023, 2:11:04 PM11/20/23
to Tasker

Yes, my phone is rooted.  I have a profile called "AppChanged" which detects when there is a new foreground app and sets some global variables to that app's name, that app's package, and the name and package of the previous foreground app and of the penultimate foreground app.

So, there always is a variable set which contains the name of the currently running foreground app.

And then I have a task called "KillForegroundApp" which uses that variable to determine the current foreground app, and then kills that app.  Here is the code:

    Profile: AppChanged
    Event: App Changed [ Output Variables:* Package:* ]
   
   
    Enter Task: SetFGAppInfo
    Settings: Run Both Together
   
    A1: Stop [ ]
        If  [ %app_name ~ %FGAppName ]
   
    A2: Variable Set [
         Name: %PenultFGAppName
         To: %LastFGAppName
         Structure Output (JSON, etc): On ]
   
    A3: Variable Set [
         Name: %PenultFGAppPackage
         To: %LastFGAppPackage
         Structure Output (JSON, etc): On ]
   
    A4: Variable Set [
         Name: %LastFGAppName
         To: %FGAppName
         Structure Output (JSON, etc): On ]
   
    A5: Variable Set [
         Name: %LastFGAppPackage
         To: %FGAppPackage
         Structure Output (JSON, etc): On ]
   
    A6: Variable Set [
         Name: %FGAppName
         To: %app_name
         Structure Output (JSON, etc): On ]
   
    A7: Variable Set [
         Name: %FGAppPackage
         To: %app_package
         Structure Output (JSON, etc): On ]
   
    #

    Task: KillForegroundApp
   
    A1: Kill App [
         App: %FGAppPackage
         Use Root: On
         Continue Task After Error:On ]
   
    #                   

Erika con k

unread,
Nov 20, 2023, 2:13:06 PM11/20/23
to tas...@googlegroups.com

Estas son algunas de las horas que tengo disponibles:

 
lunes, 20 de noviembre de 2023
 
 
 
- (GMT-3)
 
 
 
 
sábado, 25 de noviembre de 2023
 
 
 
- (GMT-3)
 
 
 
 
Mucho más fácil con Outlook
 


tas...@googlegroups.com lunes, 20 de noviembre, 4:11 p. m.
Yes, my phone is rooted.  I have a profile called "AppChanged" which detects when there is a new foreground app and sets some global variables to that app's name, that app's package, and the name and package of the previous foreground app and of the penultimate foreground app.<br><br>So, there always is a variable set which contains the name of the currently running foreground app.<br><br>And then I have a task called "KillForegroundApp" which uses that variable to determine the current foreground app, and then kills that app.  Here is the code:<br><br>    Profile: AppChanged<br>    Event: App Changed [ Output Variables:* Package:* ]<br>    <br>    <br>    Enter Task: SetFGAppInfo<br>    Settings: Run Both Together<br>    <br>    A1: Stop [ ]<br>        If  [ %app_name ~ %FGAppName ]<br>    <br>    A2: Variable Set [<br>         Name: %PenultFGAppName<br>         To: %LastFGAppName<br>         Structure Output (JSON, etc): On ]<br>    <br>    A3: Variable Set [<br>         Name: %PenultFGAppPackage<br>         To: %LastFGAppPackage<br>         Structure Output (JSON, etc): On ]<br>    <br>    A4: Variable Set [<br>         Name: %LastFGAppName<br>         To: %FGAppName<br>         Structure Output (JSON, etc): On ]<br>    <br>    A5: Variable Set [<br>         Name: %LastFGAppPackage<br>         To: %FGAppPackage<br>         Structure Output (JSON, etc): On ]<br>    <br>    A6: Variable Set [<br>         Name: %FGAppName<br>         To: %app_name<br>         Structure Output (JSON, etc): On ]<br>    <br>    A7: Variable Set [<br>         Name: %FGAppPackage<br>         To: %app_package<br>         Structure Output (JSON, etc): On ]<br>    <br>    #<br><br>    Task: KillForegroundApp<br>    <br>    A1: Kill App [<br>         App: %FGAppPackage<br>         Use Root: On<br>         Continue Task After Error:On ]<br>    <br>    #                   


Enviado desde Outlook para Android


De: tas...@googlegroups.com <tas...@googlegroups.com> en nombre de Soudane GMTA <gmta.s...@gmail.com>
Enviado: lunes, noviembre 20, 2023 4:11:23 p. m.
Para: Tasker <tas...@googlegroups.com>
Asunto: Re: What Android 13 permissions are needed for Tasker to kill running apps?
--
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/d5cf32ca-16eb-4546-acc4-aba29ea7c392n%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages