'Unable to toggle on chrome security in my native app

In my native mobile app I have a feature to enable accessibility setting so that chrome gets access to my app, when I enable the setting in my app manually, in any emulator (os 10,11), it gets turned on. But same when i try with appium, it DOES NOT get turned ON.

There is no issue in identifying the object by appium, that works fine.Just that there is a toggle button named Goggle Chrome security, when i toggle it ON and go back to Home page and come back again to settings tab in my app, it automatically gets toggled OFF with no errors

If anyone has a solution please help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source