@@ -0,0 +1,2011 @@
+package com.subitolabs.android.cordova.gallerypicker;%0A%0Aimport android.content.Context;%0Aimport android.support.v7.app.ActionBarActivity;%0Aimport android.os.Bundle;%0Aimport android.view.Menu;%0Aimport android.view.MenuItem;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.apache.cordova.PluginResult;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0A%0Aimport java.util.logging.Logger;%0A%0A%0Apublic class MainActivity extends ActionBarActivity %7B%0A%0A    static public Context context;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A%0A        context = this.getApplicationContext();%0A%0A        GalleryPickerPlugin plugin = new GalleryPickerPlugin();%0A%0A        try %7B%0A            plugin.execute(%22getMedia%22, new JSONArray(), new MyCallbackContext());%0A        %7D catch (JSONException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A%0A    @Override%0A    public boolean onCreateOptionsMenu(Menu menu) %7B%0A        // Inflate the menu; this adds items to the action bar if it is present.%0A        getMenuInflater().inflate(R.menu.menu_main, menu);%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        // Handle action bar item clicks here. The action bar will%0A        // automatically handle clicks on the Home/Up button, so long%0A        // as you specify a parent activity in AndroidManifest.xml.%0A        int id = item.getItemId();%0A%0A        //noinspection SimplifiableIfStatement%0A        if (id == R.id.action_settings) %7B%0A            return true;%0A        %7D%0A%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A%0A    private class MyCallbackContext extends CallbackContext%0A    %7B%0A        public MyCallbackContext()%0A        %7B%0A            super(%22%22, null);%0A        %7D%0A%0A        public void sendPluginResult(PluginResult pluginResult)%0A        %7B%0A            Logger.getLogger(%22my.output%22).info(%22Result: %22 + pluginResult.getJSONString());%0A        %7D%0A    %7D%0A%7D%0A

Create MainActivity.java