I would like to have a trigger on an app like Macrodroid (or any other similar app) that listens to whether or not the Keyboard is active (Specifically, Google Keyboard).
Is there any way to do this?
I would like to have a trigger on an app like Macrodroid (or any other similar app) that listens to whether or not the Keyboard is active (Specifically, Google Keyboard).
Is there any way to do this?
Android does not provide an API to check whether the soft keyboard is visible or not. A soft keyboard may not even display anything. An unreliable hack often used is to check for changes in height of the Activity, where the visible soft keyboard will reduce it.
However it is possible to checking if an hardware keyboard is visible, Automate has a block for it.
Q & A