Commit 83b77e90 by Lee Munkyeong

ABCOMM-93-協業転換実装中

parent 263341ce
...@@ -129,6 +129,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -129,6 +129,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private final String VOICE_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_voice.html"; private final String VOICE_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_voice.html";
private final String DOCUMENT_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_documents.html"; private final String DOCUMENT_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_documents.html";
private final String WHITE_BOARD_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_whiteboard.html"; private final String WHITE_BOARD_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_whiteboard.html";
private final String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
private final String DEFAULT_CHECKSUM = "0000000000"; private final String DEFAULT_CHECKSUM = "0000000000";
//AISDevelop //AISDevelop
...@@ -150,6 +151,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -150,6 +151,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private String selectedUserIdList; private String selectedUserIdList;
private String mSkey; private String mSkey;
private Integer joinMeetingId; private Integer joinMeetingId;
// 0:協業生成, 1:協業参加 // 0:協業生成, 1:協業参加
private Integer collaborationJoinFlg = 0; private Integer collaborationJoinFlg = 0;
private MeetingManager meetingManager = MeetingManager.getInstance(); private MeetingManager meetingManager = MeetingManager.getInstance();
...@@ -162,7 +164,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -162,7 +164,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private BroadcastReceiver receiver; private BroadcastReceiver receiver;
private CommunicationLogic communicationLogic = AbstractLogic.getLogic(CommunicationLogic.class); private CommunicationLogic communicationLogic = AbstractLogic.getLogic(CommunicationLogic.class);
private int mCollaborationType;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -560,29 +562,29 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -560,29 +562,29 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { public boolean shouldOverrideUrlLoading(WebView view, String url) {
Logger.d("url", "url : " + url); Logger.d("url", "url : " + url);
Uri uri = Uri.parse(url); Uri uri = Uri.parse(url);
String fileName = new File(Objects.requireNonNull(uri.getPath())).getName(); String fileName = new File(Objects.requireNonNull(uri.getPath())).getName();
// イメージをダウンロードする(png, jpg, jpeg, mp4, mov) // イメージをダウンロードする(png, jpg, jpeg, mp4, mov)
if (url.toLowerCase().endsWith(".png") || url.toLowerCase().endsWith(".jpg") || url.toLowerCase().endsWith(".jpeg") if (url.toLowerCase().endsWith(".png") || url.toLowerCase().endsWith(".jpg") || url.toLowerCase().endsWith(".jpeg")
|| url.toLowerCase().endsWith(".mov") || url.toLowerCase().endsWith(".mp4")) { || url.toLowerCase().endsWith(".mov") || url.toLowerCase().endsWith(".mp4")) {
view.loadUrl("javascript:CHAT_UI.showLoadingIndicator()"); view.loadUrl("javascript:CHAT_UI.showLoadingIndicator()");
DownloadManager mdDownloadManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); DownloadManager mdDownloadManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Request request = new DownloadManager.Request( DownloadManager.Request request = new DownloadManager.Request(
Uri.parse(url)); Uri.parse(url));
File destinationFile = new File(Environment.getExternalStorageDirectory(), fileName); File destinationFile = new File(Environment.getExternalStorageDirectory(), fileName);
request.setDescription("Downloading ..."); request.setDescription("Downloading ...");
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setDestinationUri(Uri.fromFile(destinationFile)); request.setDestinationUri(Uri.fromFile(destinationFile));
assert mdDownloadManager != null; assert mdDownloadManager != null;
mdDownloadManager.enqueue(request); mdDownloadManager.enqueue(request);
} else { // その他のファイルはurlのみ確認 } else { // その他のファイルはurlのみ確認
Logger.d("download ", "download URL :" + url); Logger.d("download ", "download URL :" + url);
}
return false;
} }
return false;
}
@Override @Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
...@@ -1447,6 +1449,16 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1447,6 +1449,16 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
public void exitMeetingRoom() { public void exitMeetingRoom() {
exitAndDeleteMeetingRoom(); exitAndDeleteMeetingRoom();
} }
@JavascriptInterface
public int getJoinCollaborationType() {
return mCollaborationType;
}
@JavascriptInterface
public void setJoinCollaborationType(int collaborationType) {
mCollaborationType = collaborationType;
}
} }
/** /**
...@@ -1543,54 +1555,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1543,54 +1555,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
super.onBackPressed(); super.onBackPressed();
} }
private void moveCollaborationScreen(Integer collaborationType) { private void moveCollaborationScreen(Integer collaborationType) {
switch (collaborationType) { mCollaborationType = collaborationType;
case 0: mChatWebView.post(new Runnable() {
mChatWebView.post(new Runnable() { @Override
@Override public void run() {
public void run() { mChatWebView.loadUrl(COLLABORATION_PAGE_URL);
mChatWebView.loadUrl(VOICE_COLLABORATION_PAGE_URL); }
} });
});
break;
case 2:
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(PICTURE_COLLABORATION_PAGE_URL);
}
});
break;
case 3:
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(VIDEO_COLLABORATION_PAGE_URL);
}
});
break;
case 4:
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(DOCUMENT_COLLABORATION_PAGE_URL);
}
});
break;
case 5:
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(WHITE_BOARD_COLLABORATION_PAGE_URL);
}
});
break;
default:
break;
}
} }
private boolean deleteFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException { private boolean deleteFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException {
......
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