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
0f2c5b21
Commit
0f2c5b21
authored
Jul 26, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JavaScriptのインタフェース名変更に対応した。
parent
15236d5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+12
-12
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
0f2c5b21
...
...
@@ -365,7 +365,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
finish
();
}
else
if
(
tempMessage
.
equals
(
getString
(
R
.
string
.
msg_invalid_parameters
)))
{
if
(
chatData
.
roomId
!=
null
)
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:C
HAT_UI
.joinRoom('%s', '%s');"
,
chatData
.
roomId
.
toString
(),
chatData
.
roomName
.
toString
()));
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:C
ommon
.joinRoom('%s', '%s');"
,
chatData
.
roomId
.
toString
(),
chatData
.
roomName
.
toString
()));
}
else
{
mChatWebView
.
loadUrl
(
ABookCommConstants
.
CHAT_PAGE_URL
);
}
...
...
@@ -514,17 +514,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
ConnectivityManager
connectivityManager
=
(
ConnectivityManager
)
getApplicationContext
().
getSystemService
(
Context
.
CONNECTIVITY_SERVICE
);
if
(
DownloadManager
.
ACTION_DOWNLOAD_COMPLETE
.
equals
(
intent
.
getAction
()))
{
mChatWebView
.
loadUrl
(
"javascript:C
HAT_UI
.dismissLoadingIndicator()"
);
mChatWebView
.
loadUrl
(
"javascript:C
ommon
.dismissLoadingIndicator()"
);
}
if
(
intent
.
getAction
().
equals
(
ConnectivityManager
.
CONNECTIVITY_ACTION
))
{
NetworkInfo
networkInfo
=
connectivityManager
.
getActiveNetworkInfo
();
if
(
networkInfo
==
null
||
!
networkInfo
.
isConnectedOrConnecting
())
{
chatData
.
setIsOnline
(
false
);
mChatWebView
.
loadUrl
(
"javascript:C
HAT_UI
.refreshForOffline();"
);
mChatWebView
.
loadUrl
(
"javascript:C
ommon
.refreshForOffline();"
);
}
else
{
chatData
.
setIsOnline
(
true
);
mChatWebView
.
loadUrl
(
"javascript:C
HAT_UI
.refreshForOnline();"
);
mChatWebView
.
loadUrl
(
"javascript:C
ommon
.refreshForOnline();"
);
if
(
mChatWebView
.
getUrl
()
!=
null
&&
mChatWebView
.
getUrl
().
equals
(
ABookCommConstants
.
CHAT_ROOM_PAGE_URL
))
{
mChatWebView
.
loadUrl
(
"javascript:window.location.reload();"
);
}
...
...
@@ -590,7 +590,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
// イメージをダウンロードする(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:C
HAT_UI
.showLoadingIndicator()"
);
view
.
loadUrl
(
"javascript:C
ommon
.showLoadingIndicator()"
);
DownloadManager
mdDownloadManager
=
(
DownloadManager
)
getSystemService
(
Context
.
DOWNLOAD_SERVICE
);
DownloadManager
.
Request
request
=
new
DownloadManager
.
Request
(
Uri
.
parse
(
url
));
...
...
@@ -702,7 +702,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
return
;
}
if
(
dataUri
!=
null
)
{
mChatWebView
.
loadChatViewUrl
(
"javascript:C
HAT_UI
.showLoadingIndicator();"
);
mChatWebView
.
loadChatViewUrl
(
"javascript:C
ommon
.showLoadingIndicator();"
);
Cursor
cursor
=
getContentResolver
().
query
(
dataUri
,
null
,
null
,
null
,
null
);
cursor
.
moveToNext
();
...
...
@@ -1061,9 +1061,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if
(
isVoice
)
{
chatData
.
roomId
=
chatRoomId
.
longValue
();
chatData
.
roomName
=
chatRoomName
;
mChatWebView
.
loadChatViewUrl
(
String
.
format
(
"javascript:C
HAT_UI
.startCollaboration('%s');"
,
ABookCommConstants
.
FLAG
.
COLLABORATION_TYPE
.
AUDIO
));
mChatWebView
.
loadChatViewUrl
(
String
.
format
(
"javascript:C
ommon
.startCollaboration('%s');"
,
ABookCommConstants
.
FLAG
.
COLLABORATION_TYPE
.
AUDIO
));
}
else
{
mChatWebView
.
loadChatViewUrl
(
String
.
format
(
"javascript:C
HAT_UI
.joinRoom('%s', '%s');"
,
chatRoomId
,
chatRoomName
));
mChatWebView
.
loadChatViewUrl
(
String
.
format
(
"javascript:C
ommon
.joinRoom('%s', '%s');"
,
chatRoomId
,
chatRoomName
));
}
}
...
...
@@ -1160,7 +1160,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
try
{
result
=
chatData
.
insertFavoriteUser
(
shopMemberId
);
if
(!
result
)
{
return
false
;
}
mChatWebView
.
loadChatViewUrl
(
"javascript:C
HAT_UI
.refreshContactScreen();"
);
mChatWebView
.
loadChatViewUrl
(
"javascript:C
ommon
.refreshContactScreen();"
);
return
true
;
}
catch
(
NetworkDisconnectedException
e
)
{
mChatWebView
.
loadChatViewUrl
(
"javascript:alert('"
+
getString
(
R
.
string
.
msg_eroor_network_offline
)
+
"');"
);
...
...
@@ -1175,7 +1175,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if
(!
result
)
{
return
false
;
}
mChatWebView
.
loadChatViewUrl
(
"javascript:C
HAT_UI
.refreshContactScreen();"
);
mChatWebView
.
loadChatViewUrl
(
"javascript:C
ommon
.refreshContactScreen();"
);
return
true
;
}
catch
(
NetworkDisconnectedException
e
)
{
mChatWebView
.
loadChatViewUrl
(
"javascript:alert('"
+
getString
(
R
.
string
.
msg_eroor_network_offline
)
+
"');"
);
...
...
@@ -1195,7 +1195,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if
(!
result
)
{
return
false
;
}
mChatWebView
.
loadChatViewUrl
(
"javascript:C
HAT_UI
.refreshContactScreen();"
);
mChatWebView
.
loadChatViewUrl
(
"javascript:C
ommon
.refreshContactScreen();"
);
return
true
;
}
catch
(
NetworkDisconnectedException
e
)
{
mChatWebView
.
loadChatViewUrl
(
"javascript:alert('"
+
getString
(
R
.
string
.
msg_eroor_network_offline
)
+
"');"
);
...
...
@@ -1211,7 +1211,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if
(!
result
)
{
return
false
;
}
mChatWebView
.
loadChatViewUrl
(
"javascript:C
HAT_UI
.refreshContactScreen();"
);
mChatWebView
.
loadChatViewUrl
(
"javascript:C
ommon
.refreshContactScreen();"
);
return
true
;
}
catch
(
NetworkDisconnectedException
e
)
{
mChatWebView
.
loadChatViewUrl
(
"javascript:alert('"
+
getString
(
R
.
string
.
msg_eroor_network_offline
)
+
"');"
);
...
...
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