package uk.co.whiteoctober.cordova;

import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;
import org.json.JSONArray;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageManager;

public class AppVersion extends CordovaPlugin {
	@Override
        public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {

		try {	
			if (action.equals("getVersionNumber")) {
				PackageManager packageManager = this.cordova.getActivity().getPackageManager();
				callbackContext.success(PluginResult.Status.OK, packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionName);
			return true;
			}
			return false;
		} catch (NameNotFoundException e) {
			callbackContext.success('Error');
			return true;
		}
	}

}

@@ -595,32 +595,8 @@
 ess(
-PluginResult.Status.OK, 
 pack
@@ -790,15 +790,13 @@
 ess(
-'Error'
+%22N/A%22
 );%0A%09

Update AppVersion.java