Android, Robotium check if soft keyboard shown. Introducing powerfull shell util class.

Hello Everybody, Today in the Robotium-developers group I have noticed that there are no “official” way to check that soft keyboard is shown. But we all know what happens when Solo clicks on the soft keyboard 🙂 Please check my solution for this useful check and use it anyway you like ^___^ Prerequirenments:

1) possibility to modify manifest file to add the permission: android.permission.DUMP

2) sometimes it is not possible to do dump due to device custom security policies from the java layer, to be sure do the following:

2.1) adb shell

2.2) if you are under the root: su system

2.3) dumpsys window If you can see useful information – everything should be okay. Implementation:

1) add some utility class, lets say ShellUtils

2) implement following methods: