Commit d176dd9a by NGUYEN HOANG SON

implement cmd goSendMessage, goDistanceSupport, goChat, actionPushMessage

parent 9ba619f9
...@@ -102,6 +102,10 @@ public class ABookKeys { ...@@ -102,6 +102,10 @@ public class ABookKeys {
public static final String RESET_SEARCH = "resetSearch"; public static final String RESET_SEARCH = "resetSearch";
public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster"; public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster";
public static final String SAVE_JSON = "saveJson"; public static final String SAVE_JSON = "saveJson";
public static final String GO_SEND_MESSAGE = "goSendMessage";
public static final String GO_DISTANCE_SUPPORT = "goDistanceSupport";
public static final String GO_CHAT = "goChat";
public static final String ACTION_PUSH_MESSAGE = "actionPushMessage";
} }
...@@ -240,5 +244,7 @@ public class ABookKeys { ...@@ -240,5 +244,7 @@ public class ABookKeys {
public static final String JSON_NAME = "jsonName"; public static final String JSON_NAME = "jsonName";
public static final String JSON_DATA = "jsonData"; public static final String JSON_DATA = "jsonData";
public static final String PUSH_MESSAGE_ID = "pushMessageId";
public static final String PUSH_MESSAGE_ACTION = "pushMessageAction";
} }
...@@ -947,7 +947,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -947,7 +947,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
} }
} }
private void showOperationSelectDialog() { protected void showOperationSelectDialog() {
OperationDao operationDao = AbstractDao.getDao(OperationDao.class); OperationDao operationDao = AbstractDao.getDao(OperationDao.class);
mOperationSelectDialog = new Dialog(this); mOperationSelectDialog = new Dialog(this);
mOperationSelectDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); mOperationSelectDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
......
...@@ -408,6 +408,20 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -408,6 +408,20 @@ public class OperationListActivity extends ABVUIActivity {
saveJson(jsonParam.getString(ABookKeys.JSON_NAME), jsonParam.getString(ABookKeys.JSON_DATA)); saveJson(jsonParam.getString(ABookKeys.JSON_NAME), jsonParam.getString(ABookKeys.JSON_DATA));
} }
break; break;
case ABookKeys.CMD_KEY.GO_SEND_MESSAGE:
showSendMessage();
break;
case ABookKeys.CMD_KEY.GO_DISTANCE_SUPPORT:
showDistanceSupport();
break;
case ABookKeys.CMD_KEY.GO_CHAT:
showChat();
break;
case ABookKeys.CMD_KEY.ACTION_PUSH_MESSAGE:
if (jsonParam.has(ABookKeys.PUSH_MESSAGE_ID)) {
actionPushMessage(jsonParam.getString(ABookKeys.PUSH_MESSAGE_ACTION), jsonParam.getInt(ABookKeys.PUSH_MESSAGE_ID));
}
break;
} }
} }
} }
...@@ -1761,4 +1775,22 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1761,4 +1775,22 @@ public class OperationListActivity extends ABVUIActivity {
}; };
} }
private void showSendMessage() {
showOperationSelectDialog();
}
private void showDistanceSupport() {
ActivityHandlingHelper.getInstance().startMeetingActivity();
}
private void showChat() {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), OperationListActivity.class.getName());
}
private void actionPushMessage(String action, int pushMessageId) {
if (action.equals("read")) {
pushMessageLogic.updateReadingFlg(pushMessageId);
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment