Skip to content

Instantly share code, notes, and snippets.

@scottbyrns
Created September 10, 2014 16:27
Show Gist options
  • Save scottbyrns/8263ec1973942df204ac to your computer and use it in GitHub Desktop.
Save scottbyrns/8263ec1973942df204ac to your computer and use it in GitHub Desktop.
package org.apache.cordova.plugin;
import org.apache.cordova.api.CordovaPlugin;
import org.apache.cordova.api.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
* This class echoes a string called from JavaScript.
*/
public class Echo extends CordovaPlugin {
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
InputMethodManager imm = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isAcceptingText()) {
return true;
}
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment