@@ -0,0 +1,1808 @@
+package com.phonegap.plugin;%0A%0Aimport java.io.File;%0A%0Aimport org.apache.cordova.api.CallbackContext;%0Aimport org.apache.cordova.api.CordovaPlugin;%0Aimport org.apache.cordova.api.PluginResult;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport android.content.Intent;%0Aimport android.net.Uri;%0Aimport android.util.Log;%0A%0A/**%0A * This class echoes a string called from JavaScript.%0A */%0A%0A%09public class Echo extends CordovaPlugin %7B%0A%09    @Override%0A%09    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException %7B%0A%09        if (action.equals(%22echo%22)) %7B%0A%09            String message = args.getString(0); %0A%09            openFile(message);%0A%09            return true;%0A%09        %7D%0A%09        return false;%0A%09    %7D %0A   %0A    %0A    //Function for opening file%0A    %0A    private PluginResult openFile(String fileUrl)%7B%0A        Log.d(%22FileViewerPlugin%22, %22View file%22+fileUrl);%0A        Intent intent = new Intent();%0A        intent.setAction(android.content.Intent.ACTION_VIEW);%0A        File file = new File(fileUrl);%0A%0A        String extension = fileUrl.substring(fileUrl.lastIndexOf(%22.%22)+1);%0A        String type = %22%22;%0A%0A        if (extension.toLowerCase().equals(%22pdf%22)) %7B%0A            type = %22application/pdf%22;%0A        %7D else if (extension.toLowerCase().equals(%22flv%22)) %7B%0A            type = %22video/flv%22;%0A        %7D else if (extension.toLowerCase().equals(%22mp4%22)) %7B%0A            type = %22video/mp4%22;%0A        %7D else if (extension.toLowerCase().equals(%22jpg%22)) %7B%0A            type = %22image/jpg%22;%0A        %7D%0A%0A        intent.setDataAndType(Uri.fromFile(file), type);%0A        cordova.getActivity().startActivity(intent);%0A%0A        Log.d(%22FileViewerPlugin%22, %22View complete in%22 + fileUrl);%0A%0A        return new PluginResult(PluginResult.Status.OK, fileUrl);%0A    %7D%0A    %0A%7D%0A

Create Echo.java