@@ -0,0 +1,2598 @@
+/*%0A * USER: Mike%0A * DATE: 3/18/2017%0A */%0A%0Apackage com.gedder.gedderalarm.util;%0A%0Aimport android.os.AsyncTask;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.net.HttpURLConnection;%0Aimport java.net.MalformedURLException;%0Aimport java.net.URL;%0A%0A/**%0A * Class to request data from Google Maps Directions API%0A *  Example usage:%0A *  In MainActivity.java%0A *      // Use urlGenerator class to create/encode url.%0A *      url.build();%0A *      String mainTest = new HTTPRequest().execute(url).get();%0A *      JsonParser test = new JsonParser(mainTest);%0A */%0Apublic class HttpRequest extends AsyncTask%3CString, String, String%3E %7B%0A    private static final String TAG = HttpRequest.class.getSimpleName();%0A%0A    private HttpURLConnection mUrlConnection = null;%0A%0A    // TEST%0A    // Need API key. Get your own on the Google Cloud Platform.%0A    // https://maps.googleapis.com/maps/api/directions/json?origin=Yonkers,NY&destination=Bronx,NY&key=MY_KEY%0A%0A    /**%0A     * Sends a request to the Google website%0A     * @param urlTest url to be sent out%0A     * @return a string builder of jsonResults%0A     */%0A    protected String doInBackground(String... urlTest) %7B%0A%0A        this.setURL(urlTest%5B0%5D);%0A%0A        StringBuilder jsonResults = new StringBuilder();%0A        try %7B%0A            URL url = new URL(urlTest%5B0%5D);%0A            mUrlConnection = (HttpURLConnection) url.openConnection();%0A            mUrlConnection.setRequestMethod(%22GET%22);%0A            mUrlConnection.setDoOutput(true);%0A            mUrlConnection.setDoInput(true);%0A%0A            InputStream is = mUrlConnection.getInputStream();%0A            BufferedReader rd = new BufferedReader(new InputStreamReader(is));%0A%0A            // Load the results into a StringBuilder%0A            String line;%0A            while ((line = rd.readLine()) != null) %7B%0A                jsonResults.append(line);%0A                jsonResults.append(%22%5Cr%22);%0A            %7D%0A%0A            rd.close();%0A%0A        %7D catch (MalformedURLException e) %7B%0A            // TODO: Handle exception.%0A        %7D catch (IOException e) %7B%0A            // TODO: Handle exception.%0A        %7D finally %7B%0A            if (mUrlConnection != null)%0A                mUrlConnection.disconnect();%0A        %7D%0A        return jsonResults.toString();%0A    %7D%0A%0A    /**%0A     * Sets a String to URL, exception is thrown if not an url%0A     * @param url url to be sent out%0A     */%0A    private void setURL(String url) %7B%0A        try %7B%0A            URL setURL = new URL(url);%0A        %7D catch (IOException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%0A%7D

Add Mikes HttpRequest class.