I have a Gionee p3s. I was trying to use tasker when i observed that the tasker accessibility service gets disabled automatically after a few minutes. Not only with tasker, all apps requiring accessibility services are having the same problem. My android version is 5.1. It will be helpful if some one can help me with this problem. :-)
I was facing the same issue on my Lenovo vibe k5. I did the followings to solve the issue.
Enable accessibility for the concerned app in the Settings.
In power saving option (in most cases it is inside the "Battery" option) select the concerned app not to be optimized.
Select the app as device administrator (this setting may be found inside "Security" option).
If possible lock the app in Task Manager so that it will not be killed when you kill all the tasks(apps). In "mi" phones you need to slide the app downward to lock it in Task Manager. I don't know how to do it in Gionee p3s. In my device this option is not available so I never kill the concerned app in the Task Manager( Or if I kill the app I re-enable the accessibility, then it remains enabled until I kill that app again).
After doing these the Accessibility option remained enabled even after restarting the phone. This may not be the exact solution you asking for, but this is all I found after hours of searching.
Hii I use the same p3s and I have found better solution.
- go to advanced settings then accessibility make the services on then
*go to power management
in that go to power manager
- take power saving mode and click on info button (right side)
unright (deactivate open the green background) don't forget to save.
you are done
In my cade, oppo f1s, i found out one solution First of all your device should be rooted, the best way to do that is through resetting firmware to factory or updating to newer oppo system image, then installing custom recovery BIOS or whatever it's name is, then then rooting under Recovery mode using Magisc... All this is described in some xda-developers forum topic. But that is not our issue for now, To prevent accessibility permission to be revoked from our service or app, we have to go developper, by browsing SETTINGS >> DEVICE INFO , then clicking about 8 times or more on BUIL NUMBER... now that we have become DEVELOPPER for good, we go back and then we navigate towards SETTINGS >> ADVANCED SETTINGS >> DEVELOPPER SETTINGS... then enable DEVELOPPER OPTIONS, open section RUNNING SERVICES, browse for application named SECURITY CENTER, inside whitch we can see 4 running services, then STOP service named CONTROL_VERIFY_SERVICE (of course on your own risk) , that is it, now just go to SETTINGS >> ADVACED SETTINGS >> ACCESSIBILITY and enable accessibikity for your application and enjoy it.....