I’m building an application of Html5 + PhoneGap for Android.
I want that when a function call the Android keyboard be hidden.
I tried to do it in the following way:
function HideKeyboard() {
alert('HideKeyboard');
plugins.SoftKeyBoard.hide(function () {
alert('s');
}, function () {
alert('f');
});
}
It did not work! There is another way?
the alert ‘HideKeyboard’ appears, but other messages do not appear
Here my plugin:
<plugin name="SoftKeyBoard" value="com.phonegap.plugins.SoftKeyboard.SoftKeyBoard" />
Thank you ..
Did you:
/src/org/apache/cordova/pluginswithSoftKeyBoard.javain itAdd the plugin definition to
/res/xml/plugins.xml:Add
softkeyboard.jsto/assets/www/jsAdd to the
headinindex.htmla reference tosoftkeyboard.js:Finally call the following on the device:
So far I can only see that you’ve done step 2 & 5.
Updated it was a namespace issue it seems, and I’ve also updated to reflect that. Glad it worked.