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 {
...
@@ -206,7 +206,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
bleManagerUtil
=
new
BleManagerUtil
(
this
,
new
BleManagerUtil
.
BleManagerUtilListener
()
{
bleManagerUtil
=
new
BleManagerUtil
(
this
,
new
BleManagerUtil
.
BleManagerUtilListener
()
{
@Override
@Override
public
void
onConnectionError
(
int
status
)
{
//bluetooth接続エラー
public
void
onConnectionError
(
int
status
)
{
//bluetooth接続エラー
Logger
.
e
(
TAG
,
"onConnectionError
"
);
Logger
.
e
(
TAG
,
"onConnectionError
status : "
+
status
);
// bluetoothのデバイスタイプ(中心温度計・放射温度計)
// bluetoothのデバイスタイプ(中心温度計・放射温度計)
int
bluetoothDeviceType
=
bleManagerUtil
.
getBluetoothDeviceType
();
int
bluetoothDeviceType
=
bleManagerUtil
.
getBluetoothDeviceType
();
// タイプによってメッセージ内容をセット
// タイプによってメッセージ内容をセット
...
@@ -215,7 +215,11 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -215,7 +215,11 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
else
if
(
bluetoothDeviceType
==
DeviceType
.
radiationThermomete
)
{
}
else
if
(
bluetoothDeviceType
==
DeviceType
.
radiationThermomete
)
{
errorAfterAbookCheckAip
(
String
.
format
(
getString
(
R
.
string
.
msg_bluetooth_connect_error
),
getString
(
R
.
string
.
radiation_thermometer
)));
errorAfterAbookCheckAip
(
String
.
format
(
getString
(
R
.
string
.
msg_bluetooth_connect_error
),
getString
(
R
.
string
.
radiation_thermometer
)));
}
}
// 通信切断
bleManagerDisconnect
();
bleManagerDisconnect
();
// ダイアログを閉じる
dismissWaitngDialog
();
}
}
@Override
@Override
...
@@ -998,6 +1002,10 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -998,6 +1002,10 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
protected
void
onStop
()
{
protected
void
onStop
()
{
super
.
onStop
();
super
.
onStop
();
Logger
.
d
(
TAG
,
"--onStop"
);
Logger
.
d
(
TAG
,
"--onStop"
);
// bluetooth通信されていたら切断
bleManagerDisconnect
();
// SPP通信の接続を切る
// SPP通信の接続を切る
disConnectSppBluetooth
();
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 {
...
@@ -69,7 +69,9 @@ public class BlePairingSettingActivity extends ABVUIActivity {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
BluetoothDevice
device
=
result
.
getDevice
();
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
(
device
.
getName
()
!=
null
&&
(
device
.
getName
().
startsWith
(
CENTER_THERMOMETE_DEVICE_NAME
)
||
device
.
getName
().
startsWith
(
RADIATION_THERMOMETE_DEVICE_NAME
)))
{
if
(!
mSavedDeviceAddressList
.
contains
(
device
.
getAddress
()))
{
//登録されたデバイスの場合、スキャン情報から除外する。
if
(!
mSavedDeviceAddressList
.
contains
(
device
.
getAddress
()))
{
//登録されたデバイスの場合、スキャン情報から除外する。
...
@@ -251,8 +253,6 @@ public class BlePairingSettingActivity extends ABVUIActivity {
...
@@ -251,8 +253,6 @@ public class BlePairingSettingActivity extends ABVUIActivity {
scanner
.
startScan
(
mLeScanCallback
);
scanner
.
startScan
(
mLeScanCallback
);
}
}
// スキャン開始(一定時間後にスキャン停止する)
// スキャン開始(一定時間後にスキャン停止する)
mHandler
.
postDelayed
(
new
Runnable
()
{
mHandler
.
postDelayed
(
new
Runnable
()
{
@Override
@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