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
80a3681c
Commit
80a3681c
authored
Jul 20, 2020
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
フォームから作業一覧に戻る時に、Bluetooth接続を切断するように修正した。
parent
28ce1e86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
+32
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+7
-0
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
View file @
80a3681c
...
@@ -340,8 +340,15 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -340,8 +340,15 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"onDestroy"
);
Logger
.
d
(
TAG
,
"onDestroy"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
//Beacon受信停止
unregisterReceiver
(
mReceiver
);
try
{
//Beacon受信停止
unregisterReceiver
(
mReceiver
);
}
catch
(
Exception
e
){
// 重量計・放射温度計を切断後に実行したところ
// IllegalArgumentException
Logger
.
e
(
TAG
,
"disconnectBluetoothDevice error"
,
e
);
}
// 接続されている機器と切断する。
// 接続されている機器と切断する。
// onuma
// onuma
...
@@ -1068,6 +1075,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -1068,6 +1075,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
// SPP通信のタスクが存在すれば接続を切るにする
// SPP通信のタスクが存在すれば接続を切るにする
private
void
disConnectSppBluetooth
()
{
private
void
disConnectSppBluetooth
()
{
mDisConnectSppBluetoothFlg
=
true
;
mDisConnectSppBluetoothFlg
=
true
;
if
(
mYamatoReceiveTask
!=
null
)
{
if
(
mYamatoReceiveTask
!=
null
)
{
mYamatoReceiveTask
.
finish
();
mYamatoReceiveTask
.
finish
();
mYamatoReceiveTask
=
null
;
mYamatoReceiveTask
=
null
;
...
@@ -1079,6 +1087,28 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -1079,6 +1087,28 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
}
}
}
// すべてのBluetooth機器から切断
// onPause処理 -> onDestroy処理の順番を一度に行う
@Override
protected
void
disconnectBluetoothDevice
()
{
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"disconnectBluetoothDevice"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
try
{
disConnectSppBluetooth
();
unregisterReceiver
(
mReceiver
);
bleManagerDisconnect
(
true
);
}
catch
(
Exception
e
){
// 重量計・放射温度計を切断後に実行したところ
// IllegalArgumentException
Logger
.
e
(
TAG
,
"disconnectBluetoothDevice error"
,
e
);
}
}
@Override
@Override
protected
void
onStop
()
{
protected
void
onStop
()
{
super
.
onStop
();
super
.
onStop
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
80a3681c
...
@@ -988,6 +988,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -988,6 +988,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd
,
mTaskKey
,
mEnableReportHistory
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
mCmd
,
mTaskKey
,
mEnableReportHistory
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
operationDto
.
reportType
,
finishCallback
,
taskReportLevel
);
operationDto
.
reportType
,
finishCallback
,
taskReportLevel
);
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
)
){
disconnectBluetoothDevice
();
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
}
}
...
@@ -1322,4 +1328,5 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1322,4 +1328,5 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
//ABVCheckContentViewActivityから処理
//ABVCheckContentViewActivityから処理
protected
void
getDeviceInfo
(
Map
<
String
,
String
>
abookCheckParam
)
{}
protected
void
getDeviceInfo
(
Map
<
String
,
String
>
abookCheckParam
)
{}
protected
void
disconnectBluetoothDevice
(){}
}
}
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