(
String action,
JSONArray args,
CallbackContext callback
)
| 61 | } |
| 62 | |
| 63 | public boolean execute( |
| 64 | String action, |
| 65 | JSONArray args, |
| 66 | CallbackContext callback |
| 67 | ) { |
| 68 | try { |
| 69 | Method method = getClass() |
| 70 | .getDeclaredMethod(action, JSONArray.class, CallbackContext.class); |
| 71 | |
| 72 | if (method != null) { |
| 73 | method.invoke(this, args, callback); |
| 74 | return true; |
| 75 | } |
| 76 | } catch (NoSuchMethodException e) { |
| 77 | callback.error("Method not found: " + action); |
| 78 | return false; |
| 79 | } catch (SecurityException e) { |
| 80 | callback.error("Security exception: " + e.getMessage()); |
| 81 | return false; |
| 82 | } catch (Exception e) { |
| 83 | callback.error("Exception: " + e.getMessage()); |
| 84 | return false; |
| 85 | } |
| 86 | |
| 87 | return false; |
| 88 | } |
| 89 | |
| 90 | public void connectUsingPassword(JSONArray args, CallbackContext callback) { |
| 91 | cordova |
no test coverage detected