src/android/Notification.java
/**
     * Executes the request and returns PluginResult.
     *
     * @param action            The action to execute.
     * @param args              JSONArray of arguments for the plugin.
     * @param callbackContext   The callback context used when calling back into JavaScript.
     * @return                  True when the action was valid, false otherwise.
     */
Executes the request and returns PluginResult.
@param action            The action to execute.
@param args              JSONArray of arguments for the plugin.
@param callbackContext   The callback context used when calling back into JavaScript.
@return                  True when the action was valid, false otherwise.
Executes the request and returns PluginResult . @param action The action to execute . @param args JSONArray of arguments for the plugin . @param callbackContext The callback context used when calling back into JavaScript . @return True when the action was valid false otherwise .
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
    	/*
    	 * Don't run any of these if the current activity is finishing
    	 * in order to avoid android.view.WindowManager$BadTokenException
    	 * crashing the app. Just return true here since false should only
    	 * be returned in the event of an invalid action.
    	 */
    	if (this.cordova.getActivity().isFinishing()) return true;
        if (action.equals(ACTION_BEEP)) {
            this.beep(args.getLong(0));
        }
        else if (action.equals(ACTION_ALERT)) {
            this.alert(args.getString(0), args.getString(1), args.getString(2), callbackContext);
            return true;
        }
        else if (action.equals(ACTION_CONFIRM)) {
            this.confirm(args.getString(0), args.getString(1), args.getJSONArray(2), callbackContext);
            return true;
        }
        else if (action.equals(ACTION_PROMPT)) {
            this.prompt(args.getString(0), args.getString(1), args.getJSONArray(2), args.getString(3), callbackContext);
            return true;
        }
        else if (action.equals(ACTION_ACTIVITY_START)) {
            this.activityStart(args.getString(0), args.getString(1));
        }
        else if (action.equals(ACTION_ACTIVITY_STOP)) {
            this.activityStop();
        }
        else if (action.equals(ACTION_PROGRESS_START)) {
            this.progressStart(args.getString(0), args.getString(1));
        }
        else if (action.equals(ACTION_PROGRESS_VALUE)) {
            this.progressValue(args.getInt(0));
        }
        else if (action.equals(ACTION_PROGRESS_STOP)) {
            this.progressStop();
        }
        else {
            return false;
        }
        callbackContext.success();
        return true;
    }
public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { /*
    	 * Don't run any of these if the current activity is finishing
    	 * in order to avoid android.view.WindowManager$BadTokenException
    	 * crashing the app. Just return true here since false should only
    	 * be returned in the event of an invalid action.
    	 */ if ( this . cordova . getActivity ( ) . isFinishing ( ) ) return true ; if ( action . equals ( ACTION_BEEP ) ) { this . beep ( args . getLong ( 0 ) ) ; } else if ( action . equals ( ACTION_ALERT ) ) { this . alert ( args . getString ( 0 ) , args . getString ( 1 ) , args . getString ( 2 ) , callbackContext ) ; return true ; } else if ( action . equals ( ACTION_CONFIRM ) ) { this . confirm ( args . getString ( 0 ) , args . getString ( 1 ) , args . getJSONArray ( 2 ) , callbackContext ) ; return true ; } else if ( action . equals ( ACTION_PROMPT ) ) { this . prompt ( args . getString ( 0 ) , args . getString ( 1 ) , args . getJSONArray ( 2 ) , args . getString ( 3 ) , callbackContext ) ; return true ; } else if ( action . equals ( ACTION_ACTIVITY_START ) ) { this . activityStart ( args . getString ( 0 ) , args . getString ( 1 ) ) ; } else if ( action . equals ( ACTION_ACTIVITY_STOP ) ) { this . activityStop ( ) ; } else if ( action . equals ( ACTION_PROGRESS_START ) ) { this . progressStart ( args . getString ( 0 ) , args . getString ( 1 ) ) ; } else if ( action . equals ( ACTION_PROGRESS_VALUE ) ) { this . progressValue ( args . getInt ( 0 ) ) ; } else if ( action . equals ( ACTION_PROGRESS_STOP ) ) { this . progressStop ( ) ; } else { return false ; } callbackContext . success ( ) ; return true ; }
Executes the request and returns PluginResult.
Executes the request and returns PluginResult .
// Only alert and confirm are async.