I would like to do that using https://code.google.com/p/android-query/wiki/AsyncAPI Does this library have support for this purpose?
I'm a newbie in Android & Java and is hard to understand the api yet.
I would like to do that using https://code.google.com/p/android-query/wiki/AsyncAPI Does this library have support for this purpose?
I'm a newbie in Android & Java and is hard to understand the api yet.
private void aync_multipart(){
String url = "https://graph.facebook.com/me/photos";
Map<String, Object> params = new HashMap<String, Object>();
params.put("message", "Message");
//Simply put a byte[] to the params, AQuery will detect it and treat it as a multi-part post
byte[] data = getImageData();
params.put("source", data);
//Alternatively, put a File or InputStream instead of byte[]
//File file = getImageFile();
//params.put("source", file);
AQuery aq = new AQuery(getApplicationContext());
aq.auth(handle).ajax(url, params, JSONObject.class, this, "photoCb");
}
From: https://code.google.com/p/android-query/wiki/AsyncAPI#Http_POST_(Multipart)
}