Skip to content

Instantly share code, notes, and snippets.

@LuizGadao
LuizGadao / PhotoMultipartRequest.java
Created January 7, 2015 22:36
My solution to send picture with Volley and get response in JSON.
package br.com.autoalerta.autoalerta.utils;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.VolleyLog;
package net.colaborativa.exampleapp.api;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;