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
33487e93
Commit
33487e93
authored
Jan 24, 2020
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
端末の再起動時、ble通信ができない問題対応(検証)
parent
55311ee9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
47 deletions
+142
-47
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
+130
-43
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
+9
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/BlePairingSettingActivity.java
+3
-3
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
View file @
33487e93
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
View file @
33487e93
...
...
@@ -206,7 +206,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
bleManagerUtil
=
new
BleManagerUtil
(
this
,
new
BleManagerUtil
.
BleManagerUtilListener
()
{
@Override
public
void
onConnectionError
(
int
status
)
{
//bluetooth接続エラー
Logger
.
e
(
TAG
,
"onConnectionError
"
);
Logger
.
e
(
TAG
,
"onConnectionError
status : "
+
status
);
// bluetoothのデバイスタイプ(中心温度計・放射温度計)
int
bluetoothDeviceType
=
bleManagerUtil
.
getBluetoothDeviceType
();
// タイプによってメッセージ内容をセット
...
...
@@ -215,7 +215,11 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
else
if
(
bluetoothDeviceType
==
DeviceType
.
radiationThermomete
)
{
errorAfterAbookCheckAip
(
String
.
format
(
getString
(
R
.
string
.
msg_bluetooth_connect_error
),
getString
(
R
.
string
.
radiation_thermometer
)));
}
// 通信切断
bleManagerDisconnect
();
// ダイアログを閉じる
dismissWaitngDialog
();
}
@Override
...
...
@@ -998,6 +1002,10 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
protected
void
onStop
()
{
super
.
onStop
();
Logger
.
d
(
TAG
,
"--onStop"
);
// bluetooth通信されていたら切断
bleManagerDisconnect
();
// SPP通信の接続を切る
disConnectSppBluetooth
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/BlePairingSettingActivity.java
View file @
33487e93
...
...
@@ -69,7 +69,9 @@ public class BlePairingSettingActivity extends ABVUIActivity {
@Override
public
void
run
()
{
BluetoothDevice
device
=
result
.
getDevice
();
Logger
.
d
(
"mScanCallback device.getName() = "
+
device
.
getName
());
if
(
device
.
getName
()
!=
null
)
{
Logger
.
d
(
"mScanCallback device.getName() = "
+
device
.
getName
());
}
// 識別商品名に絞る
if
(
device
.
getName
()
!=
null
&&
(
device
.
getName
().
startsWith
(
CENTER_THERMOMETE_DEVICE_NAME
)
||
device
.
getName
().
startsWith
(
RADIATION_THERMOMETE_DEVICE_NAME
)))
{
if
(!
mSavedDeviceAddressList
.
contains
(
device
.
getAddress
()))
{
//登録されたデバイスの場合、スキャン情報から除外する。
...
...
@@ -251,8 +253,6 @@ public class BlePairingSettingActivity extends ABVUIActivity {
scanner
.
startScan
(
mLeScanCallback
);
}
// スキャン開始(一定時間後にスキャン停止する)
mHandler
.
postDelayed
(
new
Runnable
()
{
@Override
...
...
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