@@ -0,0 +1,1508 @@
+package com.magicmicky.habitrpgmobileapp.onlineapi;%0A%0A%0Aimport org.apache.http.client.methods.HttpDelete;%0Aimport org.apache.http.client.methods.HttpRequestBase;%0Aimport org.json.JSONObject;%0A%0Aimport com.magicmicky.habitrpgmobileapp.habits.HabitItem;%0A%0Apublic class DeleteTask extends WebServiceInteraction %7B%0A%09private final static String CMD = %22user/task/%22;%0A%09public DeleteTask(OnHabitsAPIResult callback, HostConfig config, HabitItem habit) %7B%0A%09%09super(CMD + habit.getId(), callback, config);%0A%09%09System.out.println(%22DELETING %22 +CMD + habit.getId());%0A%09%7D%0A%09@Override%0A%09protected HttpRequestBase getRequest() %7B%0A%09%09%0A%09%09HttpRequestBase request = new HttpDelete();%0A       // request.addHeader(%22Content-Type%22, %22application/json%22);%0A%09%09return request;%0A%09%7D%0A%09@Override%0A%09protected Answer findAnswer(JSONObject answer) %7B%0A%09%09return new DeleteData(answer,this.getCallback());%0A%09%7D%0A%09%0A%09%0A%09public class DeleteData extends Answer %7B%0A%09%09private static final String TAG_TASK_DELETED = %22task_deleted%22;%0A%09%09/**%0A%09%09 * Create a new Answer based on the object to parse, and the callback to call after.%0A%09%09 * @param obj the object to parse%0A%09%09 * @param callback the callback to call after parsing%0A%09%09 */%0A%09%09public DeleteData(JSONObject obj, OnHabitsAPIResult callback) %7B%0A%09%09%09super(obj,callback);%0A%09%09%7D%0A%09%09/**%0A%09%09 * Parse the %7B@code object%7D%0A%09%09 */%0A%09%09public void parse() %7B%0A%09%09%09if(this.getObject().has(TAG_TASK_DELETED)) %7B%0A%09 %09%09%09callback.onDeletedTask(true);%0A%09%09%09%7D else %7B%0A%09 %09%09%09callback.onError(new WebServiceException(WebServiceException.TASK_DELETE_FAIL));%0A%0A%09%09%09%7D%0A%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Delete task forgotten file...