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
510b9f13
Commit
510b9f13
authored
Dec 11, 2020
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add source file
parent
622a870f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
9 deletions
+101
-9
ABVJE_Launcher_Android/assets/chat/public/index.html
+57
-0
ABVJE_Launcher_Android/assets/chat/public/js/chat-error.js
+16
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+0
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+28
-3
No files found.
ABVJE_Launcher_Android/assets/chat/public/index.html
0 → 100644
View file @
510b9f13
<!doctype html>
<html
lang=
"en"
style=
"background: #DBDBDB;"
>
<head>
<!-- Required meta tags -->
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"
>
<title>
Prototype
</title>
<link
href=
"./fontawesome/css/all.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"./css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"./css/lightbox.min.css"
>
<link
rel=
"stylesheet"
href=
"./css/chat.css"
>
<script>
const
PLATFORM
=
'android'
;
const
IS_MOBILE
=
true
;
</script>
</script>
</head>
<body>
<nav
class=
"navbar navbar-expand navbar-dark bg-primary fixed-top flex-md-nowrap p-2 shadow"
>
<ul
class=
"navbar-nav col-3"
id=
"navbarLeft"
>
<button
class=
"btn btn-primary"
type=
"button"
id=
"homeButton"
>
<i
class=
"fa fa-home"
style=
"font-size: 1.6rem;"
></i>
</button>
</ul>
<a
class=
"navbar-brand col-6 mr-0 text-truncate titleRoomName text-center"
href=
"#"
>
Error
</a>
</nav>
<div
class=
"error-aria"
>
<img
id=
"errorImg"
src=
"./icon/error_top_icon.svg"
>
<div
id=
"errorTitle"
>
<a>
ネットワークエラー
</a>
</div>
<div
id=
"errorMsg"
>
ネットワークに接続できませんでした。電波が良いところでもう一度接続してください。
</div>
<button
class=
"bg-primary reload-button"
id=
"reloadButton"
>
更新
</button>
<img
id=
"errorEnd"
src=
"./icon/error_footer_img.svg"
>
</div>
</div>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/popper.min.js"
></script>
<script
src=
"./js/libs/moment.js"
></script>
<script
src=
"./js/libs/locale/ko.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/libs/locale/ja.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/libs/mustache.min.js"
></script>
<script
src=
"./js/libs/deparam.js"
></script>
<script
src=
"./js/libs/bootstrap.min.js"
></script>
<script
src=
"./js/libs/jquery.mark.min.js"
></script>
<script
src=
"./js/libs/lightbox.js"
></script>
<script
src=
"./js/language.js"
></script>
<script
src=
"./js/language_ko.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/language_ja.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-error.js"
></script>
</body>
</html>
\ No newline at end of file
ABVJE_Launcher_Android/assets/chat/public/js/chat-error.js
0 → 100644
View file @
510b9f13
jQuery
(
'#homeButton'
).
on
(
'click'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要。
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
goHome
();
}
});
jQuery
(
'#reloadButton'
).
on
(
'click'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要。
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
reload
();
}
});
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
510b9f13
...
...
@@ -864,14 +864,8 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
ll_menuItem_chat
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
// チャット利用のはネットワークが繋がる時のみ
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
ActivityHandlingHelper
.
getInstance
().
startChatWebviewActivity
();
mCommunicationMenuDialog
.
dismiss
();
}
else
{
ABVToastUtil
.
showMakeText
(
getABVApplication
().
getBaseContext
(),
R
.
string
.
request_network_connection
,
Toast
.
LENGTH_SHORT
);
return
;
}
}
});
}
else
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
510b9f13
...
...
@@ -75,14 +75,18 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
isNormalSize
())
{
setPortraitIfNormal
();
}
setContentView
(
R
.
layout
.
chat_webview
);
Intent
intent
=
getIntent
();
//ネットワークがない場合専用のページを表示。
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
chatWebviewUrl
=
intent
.
getStringExtra
(
"chatWebviewUrl"
);
}
else
{
chatWebviewUrl
=
"file:///android_asset/chat/public/index.html"
;
}
sid
=
intent
.
getStringExtra
(
"sid"
);
roomId
=
intent
.
getLongExtra
(
"roomId"
,
0
);
roomName
=
intent
.
getStringExtra
(
"roomName"
);
...
...
@@ -162,7 +166,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
if
(
message
.
equals
(
"server error Ocurred"
))
{
message
=
getString
(
R
.
string
.
msg_error_chat_server
);
message
=
AB
getString
(
R
.
string
.
msg_error_chat_server
);
}
else
if
(
message
.
equals
(
"Disconnected from the server"
))
{
message
=
getString
(
R
.
string
.
msg_error_chat_disconnected
);
}
else
if
(
message
.
equals
(
"connect_error"
))
{
...
...
@@ -584,6 +588,27 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
});
}
@JavascriptInterface
public
void
goHome
()
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
backToHome
();
}
});
}
@JavascriptInterface
public
void
reload
()
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
ActivityHandlingHelper
.
getInstance
().
startChatWebviewActivity
();
}
});
}
}
/**
...
...
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