question: @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) { this . callbackContext = callbackContext ; if ( action . equals ( ENCODE ) ) { JSONObject obj = args . optJSONObject ( 0 ) ; if ( obj != null ) { String type = obj . optString ( TYPE ) ; String data = obj . optString ( DATA ) ; if ( type == null ) { type = TEXT_TYPE ; } if ( data == null ) { callbackContext . error ( "User did not specify data to encode" ) ; return true ; } encode ( type , data ) ; } else { callbackContext . error ( "User did not specify data to encode" ) ; return true ; } } else if ( action . equals ( SCAN ) ) { scan ( args ) ; } else { return false ; } return true ; }
target:  Executes the request. This method is called from the WebView thread. To do a non-trivial amount of work, use: cordova.getThreadPool().execute(runnable); To run on the UI thread, use: cordova.getActivity().runOnUiThread(runnable);