Search in sources :

Example 1 with GoogleHandle

use of com.androidquery.auth.GoogleHandle in project androidquery by androidquery.

the class AjaxAuthActivity method auth_parallel.

public void auth_parallel() {
    String url1 = "https://picasaweb.google.com/data/feed/api/user/default";
    String url2 = "https://picasaweb.google.com/data/feed/api/user/default?alt=json";
    GoogleHandle gh = new GoogleHandle(this, AQuery.AUTH_PICASA, null);
    AjaxCallback<XmlDom> cb = new AjaxCallback<XmlDom>();
    cb.url(url1).type(XmlDom.class).weakHandler(this, "pcb1");
    cb.auth(gh);
    AjaxCallback<JSONObject> cb2 = new AjaxCallback<JSONObject>();
    cb2.url(url2).type(JSONObject.class).weakHandler(this, "pcb2");
    cb2.auth(gh);
    cb.async(this);
    cb2.async(this);
//aq.progress(R.id.progress).ajax(cb);
}
Also used : JSONObject(org.json.JSONObject) XmlDom(com.androidquery.util.XmlDom) GoogleHandle(com.androidquery.auth.GoogleHandle) AjaxCallback(com.androidquery.callback.AjaxCallback) AbstractAjaxCallback(com.androidquery.callback.AbstractAjaxCallback)

Aggregations

GoogleHandle (com.androidquery.auth.GoogleHandle)1 AbstractAjaxCallback (com.androidquery.callback.AbstractAjaxCallback)1 AjaxCallback (com.androidquery.callback.AjaxCallback)1 XmlDom (com.androidquery.util.XmlDom)1 JSONObject (org.json.JSONObject)1