I am building a cordova app and i am successfully using the cordova-plugin-ionic-keyboard plugin to attach event listeners too for firing events when the keyboard shows/hides. That works with the example methods in the docs:
window.addEventListener('keyboardWillShow', (event) => {
// Describe your logic which will be run each time when keyboard is about to be shown.
console.log(event.keyboardHeight);
});
window.addEventListener('keyboardWillHide', () => {
// Describe your logic which will be run each time when keyboard is about to be closed.
});
What i want to get working is the ability to use the Keyboard.hide();
and Keyboard.show();
methods but that doesnt work because Keyboard isnt bound to the window. I tried importing {Keyboard} from the npm package but it throws errors that i dont have an ionic account access??