I wonder how it is possible to simulate a button click to launch an app through its shortcut? I have seen automation apps such as Automagic (perhaps also Tasker) do this. Are they using AccessibilityServices? If yes, how would I call such a shortcut -do I use "performGlobalAction()"?
Edit: What I really after is to emulate/simulate a click on a button or a shortcut which apps such as Tasker can do. For instance, Google Assistant cannot be opened programatically (see How to start Google Assistant programatically?) due to permission denail. However, it can be opened by clicking on a shortcut on the screen opened according to the following instructions: https://www.ytechb.com/how-to-get-google-assistant-on-any-android-lollipop-device-without-root/
With Tasker I can then add an action which opens this shortcut. Now I am wondering how Tasker does this programatically.