Android keyboard closes with delay


#1

android v4.2.2
ionic v1.0.0-beta 8
Keyboard takes a few seconds to close and then I see it

And it works out after about 3-4 seconds

Thank you :slight_smile:


#2

Do you have the ionic keyboard installed?


#3

Yes I have

<gap:plugin name="com.ionic-for-phonegap.keyboard" />

and

<feature name="Keyboard">
    <param name="ios-package" value="IonicKeyboard" onload="true" />
</feature>

Edit

Now I added this code

<feature name="Keyboard">
	<param name="android-package" value="com.ionic.keyboard.IonicKeyboard" />
	<param name="onload" value="true" />
</feature>

Does not work, I deleted and put this code

<feature name="Keyboard">
	<param name="android-package" value="IonicKeyboard" onload="true" />
</feature>

Same thing does not work: (


#4

Alright so itโ€™s for phonegap build. So technically we do not own that phonegap build plugin, someone had forked our repo and seems like they have not kept it up to date.

You may have better luck using this repo instead, which is pulling from our repo

https://build.phonegap.com/plugins/785


#5

The keyboard still gets stuck for a few seconds
What for if I add

window.addEventListener ('native.hidekeyboard', keyboardHideHandler); 
function keyboardHideHandler (e) {
alert ('Goodnight, sweet prince); 
} 

So the alert directly shown but still see half of the total white

On IOS it works good for me

isIOS = ionic.Platform.isWebView() && ionic.Platform.isIOS();

$scope.inputUp = function(){
    if(isIOS) $scope.newComment.keyboardHeight = 216;
    $timeout(function(){
        $ionicScrollDelegate.scrollBottom(true);
    }, 300);

}
$scope.inputDown = function(){
    if(isIOS) $scope.newComment.keyboardHeight = 0;
    $ionicScrollDelegate.resize();
}

#6

Possibly related to this: https://github.com/driftyco/ionic/issues/1670.

Weโ€™re waiting for the Phonegap Build plugin to get updated since there was a small fix with screen densities on Android. No guarantees on when that will happen, as it took a couple weeks for the plugin to get approved initially.