Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
83b77e90
Commit
83b77e90
authored
May 18, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ABCOMM-93-協業転換実装中
parent
263341ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
67 deletions
+42
-67
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+42
-67
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
83b77e90
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment