@@ -0,0 +1,2212 @@
+package so.doo.app.plugins;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashSet;%0Aimport java.util.List;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.apache.cordova.CordovaInterface;%0Aimport org.apache.cordova.CordovaPlugin;%0Aimport org.apache.cordova.CordovaWebView;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0A%0Aimport android.annotation.SuppressLint;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.ResolveInfo;%0A%0A@SuppressLint(%22HandlerLeak%22)%0Apublic class Apps extends CordovaPlugin %7B%0A    %0A    private Context ctx;%0A%0A     public void initialize(CordovaInterface cordova, CordovaWebView webView) %7B%0A        super.initialize(cordova, webView);%0A        ctx = cordova.getActivity().getApplicationContext();%0A    %7D%0A%0A    private JSONArray list() %7B%0A        PackageManager packageMgr = ctx.getPackageManager();%0A        Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);%0A        mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);%0A        List%3CResolveInfo%3E resovleInfos = packageMgr.queryIntentActivities(mainIntent, 0);%0A%0A        ArrayList%3CString%3E list  = new ArrayList%3CString%3E();%0A        for (ResolveInfo resolve : resovleInfos) %7B%0A            String packageName = resolve.activityInfo.packageName;%0A            list.add(packageName);%0A        %7D%0A        List%3CString%3E ulist = new ArrayList%3CString%3E(new HashSet%3CString%3E(list));%0A        %0A        return new JSONArray(ulist);%0A    %7D%0A%0A    /**%0A     * Executes the request and returns PluginResult.%0A     *%0A     * @param action            The action to execute.%0A     * @param args              JSONArry of arguments for the plugin.%0A     * @param callbackContext   The callback id used when calling back into JavaScript.%0A     * @return                  True if the action was valid, false otherwise.%0A     * @throws JSONException %0A     */%0A    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException %7B%0A        // list%0A        if (action.equals(%22list%22)) %7B%0A            JSONArray json = list();%0A            callbackContext.success(json.toString());%0A            %0A            return true;%0A        %7D%0A%0A        return false;%0A    %7D%0A%7D%0A

Create apps.java