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
61e9951f
Commit
61e9951f
authored
Jan 22, 2020
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
検証のため、ログ追加
parent
5e5dbf1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
+10
-3
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
View file @
61e9951f
...
...
@@ -156,7 +156,7 @@ public abstract class ABVActivity extends Activity {
}
public
void
showProgressPopup
(
String
msg
)
{
if
(!
isFinishing
()
&&
progressDialog
!=
null
&&
!
progressDialog
.
isShowing
())
{
Logger
.
d
(
TAG
,
"-------------------------showProgressPopup
"
);
Logger
.
d
(
TAG
,
"-------------------------showProgressPopup
msg "
+
msg
);
printLog
(
"showProgressPopup"
);
if
(
msg
!=
null
)
{
progressDialog
.
setMessage
(
msg
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
View file @
61e9951f
...
...
@@ -670,6 +670,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
final
BluetoothDevice
bluetoothDevice
=
mBluetoothAdapter
.
getRemoteDevice
(
sppDeviceDto
.
pairingDeviceAddress
);
if
(
bluetoothDevice
!=
null
)
{
Logger
.
d
(
TAG
,
"----bluetoothDevice is not null"
);
// 既に接続している場合、端末アドレスが一致すれば、接続済みと見做す。
if
(
mSppBluetoothConnectThread
!=
null
&&
mSppBluetoothConnectThread
.
getConnectedAddress
().
equals
(
bluetoothDevice
.
getAddress
()))
{
// 接続完了後、処理
...
...
@@ -681,10 +682,12 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
});
}
Logger
.
d
(
TAG
,
"----mSppBluetoothConnectThread is not null address Same"
);
}
else
{
// 初回のbluetooth接続・bluetooth対象アドレスが異なる場合、新規で接続するようにする。
// 初回ではない場合はbluetoothを一度接続を切る。
if
(
mSppBluetoothConnectThread
!=
null
)
{
Logger
.
i
(
"------------------------------1
"
);
Logger
.
d
(
TAG
,
"----mSppBluetoothConnectThread is not null address diff
"
);
disConnectSppBluetooth
();
handler
.
postDelayed
(
new
Runnable
()
{
@Override
...
...
@@ -693,6 +696,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
},
5000
);
}
else
{
Logger
.
d
(
TAG
,
"----mSppBluetoothConnectThread null"
);
setSppBluetoothThread
(
bluetoothDevice
,
sppDeviceDto
);
}
}
...
...
@@ -701,6 +705,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
private
void
setSppBluetoothThread
(
final
BluetoothDevice
bluetoothDevice
,
final
SppDeviceDto
sppDeviceDto
)
{
Logger
.
d
(
"-------setSppBluetoothThread start"
);
// 接続が切れた時、tureにセットするため、接続起動時falseに初期化する。
mDisConnectSppBluetoothFlg
=
false
;
...
...
@@ -711,6 +716,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
mSppBluetoothConnectThread
=
new
SppBluetoothConnectThread
(
bluetoothDevice
,
new
SppBluetoothConnectThread
.
bluetoothConnectThreadListener
()
{
@Override
public
void
onConnect
(
BluetoothSocket
socket
)
{
Logger
.
d
(
TAG
,
"---connect"
);
// 接続完了後、処理
if
(
mWaitingDialog
!=
null
)
{
handler
.
post
(
new
Runnable
()
{
...
...
@@ -733,7 +739,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
@Override
public
void
onFail
(
boolean
dataFormatErrorFlg
)
{
Logger
.
e
(
TAG
,
"receiveTaskThread fail
"
);
Logger
.
e
(
TAG
,
"receiveTaskThread fail
dataFormatErrorFlg : "
+
dataFormatErrorFlg
);
connectErrorSppDevice
(
sppDeviceDto
.
sppDeviceName
,
dataFormatErrorFlg
);
}
});
...
...
@@ -806,7 +812,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
// データ取得時のエラーはbluetoothを切断しない
errorAfterAbookCheckAip
(
String
.
format
(
getString
(
R
.
string
.
msg_bluetooth_receive_data_error
),
deviceName
));
}
else
{
disConnectSppBluetooth
();
//
disConnectSppBluetooth();
errorAfterAbookCheckAip
(
String
.
format
(
getString
(
R
.
string
.
msg_bluetooth_connect_error
),
deviceName
));
}
if
(
mWaitingDialog
!=
null
&&
mWaitingDialog
.
isShowing
())
{
...
...
@@ -976,6 +982,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
// SPP通信のタスクが存在すれば接続を切るにする
private
void
disConnectSppBluetooth
()
{
Logger
.
d
(
TAG
,
"----disConnectSppBluetooth"
);
mDisConnectSppBluetoothFlg
=
true
;
if
(
mYamatoReceiveTask
!=
null
)
{
mYamatoReceiveTask
.
finish
();
...
...
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