Search in sources :

Example 16 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class ActivityFragment method sendActivityStatus.

private void sendActivityStatus(String statusID, String msg) {
    Map<String, String> params = new HashMap<String, String>();
    params.put("player_tsid", ((HomeScreen) getActivity()).getPlayerID());
    if (statusID != null)
        params.put("status_id", statusID);
    params.put("txt", msg);
    GlitchRequest request0 = m_application.glitch.getRequest("activity.setStatus", params);
    request0.execute(this);
    m_requestCount = 1;
    ((HomeScreen) getActivity()).showSpinner(true);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 17 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class C2DMReceiver method removeRegistration.

public void removeRegistration(Context context, String registrationId) {
    this.context = context;
    Map<String, String> params = new HashMap<String, String>();
    params.put("type", "android");
    params.put("id", registrationId);
    params.put("registration_id", registrationId);
    GlitchRequest request = ((MyApplication) context.getApplicationContext()).glitch.getRequest("users.devices.remove", params);
    request.execute(this);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 18 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class C2DMReceiver method addRegistrationId.

public void addRegistrationId(Context context, String registrationId) {
    // save the pointer to the context so we can use it in the callback
    this.context = context;
    Map<String, String> params = new HashMap<String, String>();
    params.put("type", "android");
    params.put("id", registrationId);
    params.put("registration_id", registrationId);
    Glitch glitch = ((MyApplication) context.getApplicationContext()).glitch;
    GlitchRequest request = glitch.getRequest("users.devices.add", params);
    if (glitch.accessToken != null) {
        request.execute(this);
    } else {
        // We havent logged in yet so lets try this later
        requestFailed(request);
    }
}
Also used : HashMap(java.util.HashMap) Glitch(com.tinyspeck.android.Glitch) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 19 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class AchievementCategoriesFragment method getCategories.

public void getCategories() {
    if (m_application != null) {
        GlitchRequest request = m_application.glitch.getRequest("achievements.listAllCategories");
        request.execute(this);
        m_requestCount = 1;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 20 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class ActivityDetailFragment method getActivityStatus.

public void getActivityStatus() {
    String statusID = m_actId;
    Map<String, String> params = new HashMap<String, String>();
    params.put("player_tsid", m_playerId);
    params.put("status_id", statusID);
    GlitchRequest request0 = m_application.glitch.getRequest("activity.getStatus", params);
    request0.execute(this);
    m_requestCount = 1;
    ((HomeScreen) getActivity()).showSpinner(true);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Aggregations

GlitchRequest (com.tinyspeck.android.GlitchRequest)46 HashMap (java.util.HashMap)33 Vector (java.util.Vector)3 MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 OnTouchListener (android.view.View.OnTouchListener)1 Button (android.widget.Button)1 FrameLayout (android.widget.FrameLayout)1 ImageView (android.widget.ImageView)1 ScrollView (android.widget.ScrollView)1 TextView (android.widget.TextView)1 Glitch (com.tinyspeck.android.Glitch)1 BaseFragment.skillAvailable (com.tinyspeck.glitchhq.BaseFragment.skillAvailable)1 Map (java.util.Map)1 JSONArray (org.json.JSONArray)1 JSONObject (org.json.JSONObject)1