How to show keyboard on input focus in android?


I have used CrossWalk chromeview on Android. Keyboard showing on input focus works fine on ios but doesn’t work on android. I have tried almost every options I could find. Since I am an android programmer, I edited java files and tried many possible solutions from stackoverflow.

I am using javascript to focus an input box.

I also tried solution pointed out here.

None of these works for me.

Has anyone solved this problem? Please help me its been a nightmare.


There is the ionic keyboard plugin for cordova/phonegap, where you get keyboard access to hide/show the keyboard manually.

Source code:



I have tried those plugins. There are methods to hide keyboard but not for showing.






Try to use a “click” on the input-field instead of focus.

Maybe that works.



I forked the ionic keyboard project and added a method to it for those cases that an auto focus does not pop up a keyboard on Android devices. You can find it here:

I also sent a pull request to the Ionic guys to potentially update the official plugin


Thanks for your reply but it didn’t work.


Did you uninstall the original keyboard plugin before trying the fork?


It worked thank you very much


I tried that plugin but it did not work. Do I have to fork, or just use a zip file, or even install the plugin with command?


Can you suggest how this gets added into the app? From another post i tried simple using:
cordova plugin add
to add to my app. this does add a plugins/com.ionic.keyboard folder.
but then how to add into app. from another post i found all that was needed was to add:;
in my $ionicPlatform.ready(function() {}; but when i do this all i get is console is “cordova is not defined”

any hints?


did you include “cordova.js” in your index.html file?
you need to add “ngCordova” as module dependency in your app


Annnd you are testing on mobile devices?
With a built app?

Then something else goes wrong when “cordova” or “window.cordova” is not defined.

And like @blablapolicja wrote -> you have to include the dependencies in your app.


Is there any way to display the keyboard with a specific input type? only displays alphanumeric. How about number or tel?

#15 is not supported by iOS?

from documentation:;

Supported Platforms
Android, Blackberry 10


hm… I have tried this method on ios, seems didn’t worked.


Cordova comes with a config for this; Just add it to the config.xml file at the root of the project and you should be good to go:

<preference name="KeyboardDisplayRequiresUserAction" value="false" />


Note that <preference name="KeyboardDisplayRequiresUserAction" value="false" /> only applies to iOS, not Android. InAppBrowser version 1.7.2-dev.