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
b195892f
Commit
b195892f
authored
Apr 26, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
認証問題対応
parent
60772113
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
26 deletions
+33
-26
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+29
-22
gradle.properties
+4
-4
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
b195892f
...
@@ -18,6 +18,7 @@ import android.net.ConnectivityManager;
...
@@ -18,6 +18,7 @@ import android.net.ConnectivityManager;
import
android.net.Network
;
import
android.net.Network
;
import
android.net.NetworkInfo
;
import
android.net.NetworkInfo
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.net.http.SslError
;
import
android.net.wifi.WifiManager
;
import
android.net.wifi.WifiManager
;
import
android.os.AsyncTask
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.os.Build
;
...
@@ -32,6 +33,7 @@ import android.webkit.DownloadListener;
...
@@ -32,6 +33,7 @@ import android.webkit.DownloadListener;
import
android.webkit.JavascriptInterface
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.JsResult
;
import
android.webkit.JsResult
;
import
android.webkit.PermissionRequest
;
import
android.webkit.PermissionRequest
;
import
android.webkit.SslErrorHandler
;
import
android.webkit.ValueCallback
;
import
android.webkit.ValueCallback
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
import
android.webkit.WebSettings
;
...
@@ -363,7 +365,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -363,7 +365,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
});
});
myAlertDialog
=
dialog
;
myAlertDialog
=
dialog
;
if
(!
isFinishing
())
{
if
(!
isFinishing
()
&&
!
message
.
equals
(
"false"
)
)
{
dialog
.
show
();
dialog
.
show
();
}
}
result
.
confirm
();
result
.
confirm
();
...
@@ -383,7 +385,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -383,7 +385,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
else
if
(
message
.
equals
(
"error_already_exist_same_user"
))
{
}
else
if
(
message
.
equals
(
"error_already_exist_same_user"
))
{
message
=
getString
(
R
.
string
.
msg_error_already_exist_same_room
);
message
=
getString
(
R
.
string
.
msg_error_already_exist_same_room
);
}
else
{
}
else
{
message
=
"Confirm ?"
;
message
=
message
;
}
}
ABookAlertDialog
confirmAlert
=
AlertDialogUtil
.
createAlertDialog
(
ChatWebviewActivity
.
this
,
R
.
string
.
app_name
);
ABookAlertDialog
confirmAlert
=
AlertDialogUtil
.
createAlertDialog
(
ChatWebviewActivity
.
this
,
R
.
string
.
app_name
);
...
@@ -522,28 +524,33 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -522,28 +524,33 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@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
public
void
onReceivedSslError
(
WebView
view
,
SslErrorHandler
handler
,
SslError
error
)
{
handler
.
proceed
();
}
}
});
});
}
}
...
...
gradle.properties
View file @
b195892f
...
@@ -40,14 +40,14 @@ app_versioncode=1
...
@@ -40,14 +40,14 @@ app_versioncode=1
#cms server
#cms server
#acms_address=http://10.0.2.2:8081/acms
#acms_address=http://10.0.2.2:8081/acms
#download_server_address=http://10.0.2.2:8081/acms
#download_server_address=http://10.0.2.2:8081/acms
acms_address
=
https://ch
atdev2
.agentec.jp/acms
acms_address
=
https://ch
eckdev1
.agentec.jp/acms
download_server_address
=
https://ch
atdev2
.agentec.jp/acms
download_server_address
=
https://ch
eckdev1
.agentec.jp/acms
#acms_address=https://check.abookcloud.com/acms
#acms_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
#syncview server
#syncview server
websocket_server_http_url
=
https://ch
atdev2
.agentec.jp/v1
websocket_server_http_url
=
https://ch
eckdev1
.agentec.jp/v1
websocket_server_ws_url
=
wss://ch
atdev2
.agentec.jp/v1
websocket_server_ws_url
=
wss://ch
eckdev1
.agentec.jp/v1
#WebSocket debug�o��
#WebSocket debug�o��
websocket_debug
=
false
websocket_debug
=
false
...
...
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