Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use Phonegap SoftKeyboard Plugin for Android?

    • 0
    • 3
    • 3
    • 1
    • 0
    • 0
    • 0
    • 0
    • 840
    Comment on it

    Hello All,

    Here I am sharing some information to include and use of the SoftKeyboard Plugin for Android.

    1.Install SoftKeyboard plugin using the latest version from GitHub:

    $ cordova plugin add https://github.com/phonostar/PhoneGap-SoftKeyboard.git
    

    2.Include the JavaScript wrapper:

    Place a copy of softkeyboard.js from here in your application(e.g., in www/scripts/plugins and include it in your HTML files as needed; e.g.

    <script src="scripts/plugins/softkeyboard.js"></script>
    

    3.Reference the plugin in your Android configuration:

    Add the following line to your www/config.android.xml file as a child element to the cordova/plugins element of your project:

    <plugin name="SoftKeyboardPlugin" value="net.same2u.phonegap.plugin.SoftKeyboard" onload="true"/>
    

    4.You can use the plugin as per your need by the following code:

    if (device.platform === 'Android') {  // Be sure to only call on Android devices.
      plugins.softKeyboard.show(function () {
          // success
      },function (errDescr) {
         // fail
      });
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: