Commit 1b764ccc by NGUYEN HOANG SON

Merge branch 'features/1.4.400_49464' into features/1.4.400

* features/1.4.400_49464:
  implement cmd goSendMessage, goDistanceSupport, goChat, actionPushMessage
parents 0a777699 d176dd9a
...@@ -105,6 +105,10 @@ public class ABookKeys { ...@@ -105,6 +105,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";
} }
...@@ -243,5 +247,7 @@ public class ABookKeys { ...@@ -243,5 +247,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);
......
...@@ -409,6 +409,20 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -409,6 +409,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;
} }
} }
} }
...@@ -1762,4 +1776,22 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1762,4 +1776,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