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);
}
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);
}
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);
}
}
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);
}
}
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);
}
Aggregations