Commit 83b77e90 by Lee Munkyeong

ABCOMM-93-協業転換実装中

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