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
761d62a2
Commit
761d62a2
authored
Apr 20, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
協業実装
parent
cdf16803
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
0 deletions
+131
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
+12
-0
ABVJE_Launcher_Android/AndroidManifest.xml
+2
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+117
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
View file @
761d62a2
...
...
@@ -108,6 +108,18 @@ public interface ABookCommConstants {
Integer
COLLABORATION_START
=
4
;
Integer
COLLABORATION_END
=
5
;
}
interface
COLLABORATION_TYPE
{
Integer
AUDIO
=
0
;
Integer
CAMERA
=
2
;
Integer
VIDEO
=
3
;
}
interface
COLLABORATION_JOIN_FLG
{
Integer
CREATE
=
0
;
Integer
JOIN
=
1
;
}
Integer
GROUP_REQUEST_ALL
=
0
;
}
...
...
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
761d62a2
...
...
@@ -33,6 +33,8 @@
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.FLASHLIGHT"
/>
<uses-permission
android:name=
"android.permission.MODIFY_AUDIO_SETTINGS"
/>
<permission
android:name=
"${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel=
"signature"
/>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
761d62a2
...
...
@@ -20,8 +20,10 @@ import android.net.NetworkInfo;
import
android.net.Uri
;
import
android.net.wifi.WifiManager
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.support.annotation.RequiresApi
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.Window
;
...
...
@@ -29,6 +31,7 @@ import android.webkit.CookieManager;
import
android.webkit.DownloadListener
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.JsResult
;
import
android.webkit.PermissionRequest
;
import
android.webkit.ValueCallback
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
...
...
@@ -108,6 +111,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
final
String
CHAT_PAGE_URL
=
"file:///android_asset/chat/public_new/chat.html"
;
private
final
String
CHAT_ROOM_PAGE_URL
=
"file:///android_asset/chat/public_new/chat_room.html"
;
private
final
String
PICTURE_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_picture.html"
;
private
final
String
VIDEO_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_video.html"
;
private
final
String
VOICE_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_voice.html"
;
private
final
String
DEFAULT_CHECKSUM
=
"0000000000"
;
//AISDevelop
...
...
@@ -126,6 +132,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
Integer
shopMemberId
;
private
String
selectedUserIdList
;
// 0:協業生成, 1:協業参加
private
Integer
collaborationJoinFlg
=
0
;
public
AlertDialog
myAlertDialog
;
private
ImageButton
mOperationHomeButton
;
// ホームボタン
...
...
@@ -229,6 +238,12 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
mChatWebView
.
setWebChromeClient
(
new
FullscreenableChromeClient
(
this
)
{
@Override
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
LOLLIPOP
)
public
void
onPermissionRequest
(
final
PermissionRequest
request
)
{
request
.
grant
(
request
.
getResources
());
}
@Override
public
boolean
onShowFileChooser
(
WebView
webView
,
ValueCallback
<
Uri
[]>
filePathCallback
,
FileChooserParams
fileChooserParams
)
{
boolean
result
=
false
;
// 画像が選択された場合
...
...
@@ -1238,6 +1253,77 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
communicationLogic
.
updateArchiveDetial
(
resultJson
.
archiveDto
);
}
@JavascriptInterface
public
void
joinCollaboration
(
String
collaborationType
)
{
collaborationJoinFlg
=
ABookCommConstants
.
FLAG
.
COLLABORATION_JOIN_FLG
.
JOIN
;
switch
(
Integer
.
parseInt
(
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
;
default
:
break
;
}
}
@JavascriptInterface
public
void
startCollaboration
(
String
collaborationType
)
{
collaborationJoinFlg
=
ABookCommConstants
.
FLAG
.
COLLABORATION_JOIN_FLG
.
CREATE
;
switch
(
Integer
.
parseInt
(
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
;
default
:
break
;
}
}
@JavascriptInterface
public
String
getCollaborationJoinFlg
()
{
return
collaborationJoinFlg
.
toString
();
}
}
/**
...
...
@@ -1291,6 +1377,37 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
return
result
;
}
private
void
moveCollaborationScreen
(
Integer
collaborationType
)
throws
NetworkDisconnectedException
,
AcmsException
{
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
;
default
:
break
;
}
}
private
boolean
deleteFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
deleteFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
...
...
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