/**
 */
package com.example;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaInterface;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.PluginResult;
import org.apache.cordova.PluginResult.Status;
import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;

import android.util.Log;

import java.util.Date;

public class BarPrinter extends CordovaPlugin {
  private static final String TAG = "BarPrinter";

  public void initialize(CordovaInterface cordova, CordovaWebView webView) {
    super.initialize(cordova, webView);

    Log.d(TAG, "Initializing BarPrinter");
  }

  public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
    if(action.equals("echo")) {
      String phrase = args.getString(0);
     // callbackContext.success("bar shahaf");
     
      final PluginResult result = new PluginResult(PluginResult.Status.OK, ("lolll"));
      callbackContext.sendPluginResult(result);
      
      
      // Echo back the first argument
      Log.d(TAG, phrase);
    } else if(action.equals("getDate")) {
      // An example of returning data back to the web layer
     // return new PluginResult("ok", "result");
      
      //callbackContext.success("bar shahaf");
    }
    return true;
  }

}

@@ -804,16 +804,376 @@
 n %7B%0A    
+if(action.equals(%22PrintPdf%22)) %7B%0A      String phrase = args.getString(0);%0A     // callbackContext.success(%22bar shahaf%22);%0A     %0A      final PluginResult result = new PluginResult(PluginResult.Status.OK, (%22PrintPdf%22+phrase));%0A      callbackContext.sendPluginResult(result);%0A      %0A      %0A      // Echo back the first argument%0A      Log.d(TAG, phrase);%0A    %7D else 
 if(actio
@@ -1188,24 +1188,24 @@
 (%22echo%22)) %7B%0A
-
       String
@@ -1491,32 +1491,32 @@
 d(TAG, phrase);%0A
+
     %7D else if(ac
@@ -1501,33 +1501,32 @@
 ase);%0A    %7D else
- 
 if(action.equals

Update BarPrinter.java