use of ingage.ingage.handlers.QueryThreadsHandler in project iNGAGE by davis123123.
the class CategoriesPageFragment method getThreadsJSON.
public void getThreadsJSON(int rowCount) {
queryThreadsHandler = new QueryThreadsHandler();
session = new SessionManager(getActivity().getApplicationContext());
HashMap<String, String> user = session.getUserDetails();
String type = user.get(SessionManager.PAGE_TYPE);
String categoryType = user.get(SessionManager.CATEGORY_TYPE);
try {
if (categoryType != null)
json_string = queryThreadsHandler.execute("categoryDate", categoryType, String.valueOf(rowCount)).get();
else
json_string = queryThreadsHandler.execute("date", String.valueOf(rowCount)).get();
Log.d("STATE", "query result : " + json_string);
threadListAdapter.setLoaded(false);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
use of ingage.ingage.handlers.QueryThreadsHandler in project iNGAGE by davis123123.
the class ArchivedFragment method getThreadsJSON.
public void getThreadsJSON(int rowCount) {
queryThreadsHandler = new QueryThreadsHandler();
SessionManager session = new SessionManager(getActivity().getApplicationContext());
HashMap<String, String> user = session.getUserDetails();
String test = user.get(SessionManager.CATEGORY_TYPE);
Log.d("ARCCATE", " " + test + " " + rowCount);
try {
if (user.get(SessionManager.CATEGORY_TYPE) != null) {
json_string = queryThreadsHandler.execute("categoryArchived", user.get(SessionManager.CATEGORY_TYPE), String.valueOf(rowCount)).get();
Log.d("ARCCATE2", " " + json_string);
} else {
json_string = queryThreadsHandler.execute("archived", String.valueOf(rowCount)).get();
}
Log.d("STATE", "query result : " + json_string);
threadListAdapter.setLoaded(false);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
Aggregations