diff --git a/lib/devices/android/android-controller.js b/lib/devices/android/android-controller.js index edc1df9c8..07450d75e 100644 --- a/lib/devices/android/android-controller.js +++ b/lib/devices/android/android-controller.js @@ -677,8 +677,16 @@ androidController.setLocation = function (latitude, longitude, altitude, horizon }); }; +// keyName parameter only used for iOS. Please ignore it for android. androidController.hideKeyboard = function (keyName, cb) { - cb(new NotYetImplementedError(), null); + this.adb.isSoftKeyboardPresent(function (err, isKeyboardPresent) { + if (err) return cb(err); + if (isKeyboardPresent) { + this.back(cb); + } else { + return cb(new Error("Soft keyboard not present, cannot hide keyboard")); + } + }.bind(this)); }; androidController.url = function (url, cb) { diff --git a/package.json b/package.json index 0be0a048d..84a1fb332 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "dependencies": { "adm-zip": "~0.4.4", - "appium-adb": "~1.0.1", + "appium-adb": "~1.0.2", "appium-atoms": "~0.0.5", "appium-instruments": "~1.0.0", "appium-uiauto": "~1.0.0", diff --git a/submodules/appium-adb b/submodules/appium-adb index 74de17a43..ca979b81f 160000 --- a/submodules/appium-adb +++ b/submodules/appium-adb @@ -1 +1 @@ -Subproject commit 74de17a43170e621d1432fe64270f45a43ce5f81 +Subproject commit ca979b81f3ff171fc0a9eb8fa4244890b656e946