Forcing Tasker Accessibility to be always enabled in Android 11?

1,628 views
Skip to first unread message

Soudane GMTA

unread,
Mar 13, 2021, 8:54:46 PM3/13/21
to Tasker
I seem to recall reading somewhere that there might be a way in Android 11 to force Accessibility to always be enabled for Tasker. However, I haven't been able to find the discussion about this.

Am I remembering correctly that such a thing exists? If so, how can I set up Tasker's Accessibility setting to always be enabled under Android 11?

Thank you very much.

João Dias

unread,
Mar 15, 2021, 5:24:35 AM3/15/21
to tas...@googlegroups.com
Not sure what you mean exactly, but simply enabling the Accessibility service should do that already... Does it turn off for you automatically?

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Soudane GMTA

unread,
Mar 15, 2021, 7:35:35 PM3/15/21
to Tasker
On Monday, March 15, 2021 at 5:24:35 AM UTC-4 joaomgcd wrote:
Not sure what you mean exactly, but simply enabling the Accessibility service should do that already... Does it turn off for you automatically?

Tasker's Accessibility (and possibly the Accessibility for other software, as well) keeps getting turned off automatically during the course of the day, and it needs to be restarted ... at least under Android 10 and possibly earlier Android versions. There have been attempts to turn Accessibility back on for Tasker by means of periodic runs of one of the "Auto-" utilities (I can't remember which one). However, that is time-dependent, and there still can be intervals where Tasker's Accessibility is not enabled and must be manually restarted.

But I vaguely remember reading somewhere that there might be some way to manage this problem under Android 11, and this is what prompted me to post this message here.


Scott Miller

unread,
Mar 15, 2021, 7:44:00 PM3/15/21
to tas...@googlegroups.com
Use Tasker's custom settings. I run a task every 30 minutes on my tablet and I haven't noticed a problem since. For some reason my phone doesn't experience the problem.

Scott M.

--
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/94db87e0-db74-4c2a-b900-ea50051cd765n%40googlegroups.com.

Robert Ryan

unread,
Mar 15, 2021, 8:39:43 PM3/15/21
to tas...@googlegroups.com, Soudane GMTA
You could try this task. It automatically detects if Tasker's accessibility service is disabled and re-enables it. 


Soudane GMTA

unread,
Mar 15, 2021, 10:54:43 PM3/15/21
to Tasker
On Monday, March 15, 2021 at 8:39:43 PM UTC-4 rbr...@gmail.com wrote:
You could try this task. It automatically detects if Tasker's accessibility service is disabled and re-enables it. 


Aha! That does the job.

I was already polling and resetting the Tasker Accessibility service every 30 minutes, but that is a race condition, and there were times when the shutdown of Tasker's accessibility fell through the cracks.

But this Custom Setting Event context does exactly what I want. I can now even go to Settings->System->Accessibility and manually set Use Service to off for Tasker, and it immediately turns on again automatically.

Thank you very much!

Soudane GMTA

unread,
Mar 16, 2021, 12:14:02 AM3/16/21
to Tasker
PS: ... and this works for me under Android 10.

João Dias

unread,
Mar 16, 2021, 6:05:20 AM3/16/21
to tas...@googlegroups.com
Glad it works! Just to be clear though, the accessibility service should never be stopped in normal circumstances. It is a system anomaly. Glad you could work around it :)

Soudane GMTA

unread,
Mar 16, 2021, 4:11:57 PM3/16/21
to Tasker
Sadly, I spoke too soon. My Tasker Accessibility settings got turned turned off, and this Custom Setting event context didn't get triggered. I once again got a Tasker error which stated that Tasker's Accessibility settings needed to be set. I went to Settings->System->Accessibility and indeed saw that Tasker's setting was set to "off". I had to manually turn it back on again.

This is under Android 10. I have no info about Android 11.

Feature request: the ability to set a special "exception handler" context which gets triggered whenever there is a Tasker error message, such as the message I referred to above which stated that Tasker's Accessibility settings was turned off. The error information could be stored in variables which could be queried in the associated task which would get invoked by this context. I could then write code to detect this case and turn Tasker's Accessibility back on.

Or this could be a special Function or Command, or something like that.

Would such a thing be possible to be added in a future version of Tasker?

On Monday, March 15, 2021 at 10:54:43 PM UTC-4 Soudane GMTA wrote:

Rich D

unread,
Mar 16, 2021, 4:50:05 PM3/16/21
to Tasker Google Groups Post
If Android is killing tasker that could be The reason you're losing your accessibility permission.  I would set up a monitor start profile and write to a log in the linked task as well as throw up a notification whenever Tasker has been restarted. This will give you a better feel if that is the issue. If it is then you could use the monitor start context to refresh your accessibility settings.

Soudane GMTA

unread,
Mar 16, 2021, 6:28:53 PM3/16/21
to Tasker
It didn't occur to me that Takser itself might be getting killed. I'll do what you suggested and report back when I have more data.

Thank you!
Reply all
Reply to author
Forward
0 new messages