@@ -0,0 +1,1977 @@
+package edu.berkeley.eecs.cordova.serversync;%0A%0Aimport edu.berkeley.eecs.cordova.settings.ConnectionSettings;%0A%0Apublic class CommunicationHelper %7B%0A    public static final String TAG = %22CommunicationHelper%22;%0A%0A    /*%0A     * Pushes the stats to the host.%0A     */%0A    public static void pushStats(Context cachedContext, String userToken,%0A                                 JSONObject appStats) throws IOException, JSONException %7B%0A        String commuteTrackerHost = ConnectionSettings.getConnectURL(cachedContext);%0A        edu.berkeley.eecs.cordova.comm.CommunicationHelper.pushJSON(%0A            cachedContext, commuteTrackerHost + %22/stats/set%22, userToken, %22stats%22, appStats);%0A    %7D%0A%0A    /*%0A     * Gets user cache information from server%0A     */%0A%0A    public static JSONArray server_to_phone(Context cachedContext, String userToken)%0A            throws IOException, JSONException %7B%0A        String commuteTrackerHost = ConnectionSettings.getConnectURL(cachedContext);%0A        String fullURL = commuteTrackerHost + %22/usercache/get%22;%0A        String rawJSON = edu.berkeley.eecs.cordova.comm.CommunicationHelper.getUserPersonalData(cachedContext, fullURL, userToken);%0A        if (rawJSON.trim().length() == 0) %7B%0A            // We didn't get anything from the server, so let's return an empty array for now%0A            // TODO: Figure out whether we need to return a blank array from the server instead%0A            return new JSONArray();%0A        %7D%0A        JSONObject parentObj = new JSONObject(rawJSON);%0A        return parentObj.getJSONArray(%22server_to_phone%22);%0A    %7D%0A%0A    /*%0A     * Pushes user cache to the server%0A     */%0A    public static void phone_to_server(Context cachedContext, String userToken, JSONArray entryArr)%0A            throws IOException, JSONException %7B%0A        String commuteTrackerHost = ConnectionSettings.getConnectURL(cachedContext);%0A        pushJSON(cachedContext, commuteTrackerHost + %22/usercache/put%22,%0A                userToken, %22phone_to_server%22, entryArr);%0A    %7D%0A%7D%0A

Add a CommunicationHelper for this package