use of ingage.ingage20.managers.SessionManager in project iNGAGE by davis123123.
the class ChatActivity method onResume.
@Override
public void onResume() {
super.onResume();
Log.d("RESUMECHAT", "textRESUME ");
HashMap<String, String> chat_user = chatRoomManager.getUserDetails();
String spectator = chat_user.get(ChatRoomManager.SPECTATOR);
// check from cache is user is spectator
if (spectator.equals("true") && paused) {
String type = "spectate";
session = new SessionManager(getApplicationContext());
HashMap<String, String> user = session.getUserDetails();
String username = user.get(SessionManager.KEY_NAME);
SpectateRoomHandler spectateRoomHandler = new SpectateRoomHandler(getApplicationContext());
String result;
setSpectateMode();
try {
result = spectateRoomHandler.execute(type, thread_id, username).get();
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
paused = false;
}
}
Aggregations