Appium autoaton of a login form

I am stuck with a login form automation and it is really frustrating. I am trying to enter some credential into my username and password text fields. My problem is when i enable this driver.hideKeyboard(); method then keypad doesnt appear so the console show error that no softkeyboard found…So i disable that hide keyboard method and then the keyboard appears this time and there is no method to hide it becoz i disable it…What to do?? thanks in advance