@@ -0,0 +1,2275 @@
+import android.os.AsyncTask;%0A%0Aimport org.apache.http.HttpResponse;%0Aimport org.apache.http.client.HttpClient;%0Aimport org.apache.http.client.methods.HttpPost;%0Aimport org.apache.http.entity.mime.HttpMultipartMode;%0Aimport org.apache.http.entity.mime.MultipartEntityBuilder;%0Aimport org.apache.http.impl.client.DefaultHttpClient;%0Aimport org.apache.http.protocol.BasicHttpContext;%0Aimport org.apache.http.protocol.HttpContext;%0Aimport org.apache.http.util.EntityUtils;%0Aimport org.json.JSONObject;%0A%0Aimport java.io.File;%0A%0Apublic class ImgurUploader extends AsyncTask%3CFile, Void, String%3E %7B%0A    //TODO: Change CLIENT_ID to your personal Imgur Client ID%0A    private static String CLIENT_ID = %22Your Client ID from the Imgur API. Ex: 123ab4c567890d%22;%0A%0A    @Override%0A    public String doInBackground(File... params) %7B%0A        final String upload_to = %22https://api.imgur.com/3/upload.json%22;%0A        final String API_key = %22API_KEY%22;%0A%0A        HttpClient httpClient = new DefaultHttpClient();%0A        HttpContext localContext = new BasicHttpContext();%0A        HttpPost httpPost = new HttpPost(upload_to);%0A%0A        httpPost.setHeader(%22Authorization%22, %22Client-ID %22+ CLIENT_ID);%0A%0A        try %7B%0A            MultipartEntityBuilder builder = MultipartEntityBuilder.create();%0A            builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);%0A            builder.addTextBody(%22key%22, API_key);%0A            builder.addBinaryBody(%22image%22, params%5B0%5D);%0A            httpPost.setEntity(builder.build());%0A%0A            final HttpResponse response = httpClient.execute(httpPost, localContext);%0A            final String response_string = EntityUtils.toString(response.getEntity());%0A            final JSONObject json = new JSONObject(response_string);%0A%0A            if (json.getBoolean(%22success%22)) %7B%0A                JSONObject results = (JSONObject) json.get(%22data%22);%0A                return results.getString(%22link%22);%0A            %7D%0A            else %7B%0A                System.out.println(%22Error posting image to Imgur.%22);%0A            %7D%0A%0A        %7D catch (Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return null;%0A    %7D%0A%0A    @Override%0A    protected void onPostExecute(String result) %7B%0A        if (result != null) %7B%0A            System.out.println(%22Success! Image link: %22 + result);%0A        %7D%0A    %7D%0A%7D%0A

Create ImgurUploader.java