I have a rooted device where I am checking if the soft keyboard is visible by executing this adb command in the terminal:
adb shell dumpsys window InputMethod | grep "mHasSurface"
and this is the output:
mHasSurface=true mShownPosition=[0,1176] isReadyForDisplay()=true hasSavedSurface()=false mWindowRemovalAllowed=false
I am able to execute the same adb command from my app (using root) but I don't know how to get the output. Does anyone know if its possible to get the output in app? Thank you in advance.