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
b71b72a9
Commit
b71b72a9
authored
Jun 16, 2022
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#47941 HW連携 アルコールチェッカーから値を取得する処理を追加中3
parent
349e1746
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
274 additions
and
189 deletions
+274
-189
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerUtil.java
+29
-46
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
+56
-57
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtilListener.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+187
-85
No files found.
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
b71b72a9
...
@@ -1527,4 +1527,5 @@
...
@@ -1527,4 +1527,5 @@
<string
name=
"msg_location_device_no_allow"
>
端末の設定から位置情報をONにしてください。
</string>
<string
name=
"msg_location_device_no_allow"
>
端末の設定から位置情報をONにしてください。
</string>
<string
name=
"alc_checker_setting"
>
アルコールチェッカー設定
</string>
<string
name=
"alc_checker_setting"
>
アルコールチェッカー設定
</string>
<string
name=
"alcohl_checker"
>
アルコールチェッカー
</string>
<string
name=
"alcohl_checker"
>
アルコールチェッカー
</string>
<string
name=
"ble_connecting"
>
の電源を入れて、電源ボタンを押してください
</string>
</resources>
</resources>
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerUtil.java
View file @
b71b72a9
...
@@ -105,7 +105,7 @@ public class AlcoholCheckerUtil {
...
@@ -105,7 +105,7 @@ public class AlcoholCheckerUtil {
public
static
final
UUID
TX_CHARACTERISTIC_UUID
=
UUID
.
fromString
(
"442F1572-8A00-9A28-CBE1-E1D4212D53EB"
);
// Taiyo Yuden Tx Characteristic
public
static
final
UUID
TX_CHARACTERISTIC_UUID
=
UUID
.
fromString
(
"442F1572-8A00-9A28-CBE1-E1D4212D53EB"
);
// Taiyo Yuden Tx Characteristic
private
final
int
MAX_MESSAGE_COUNT
=
20
;
// Number of messages to show in UI
private
final
int
MAX_MESSAGE_COUNT
=
20
;
// Number of messages to show in UI
private
String
rxMessage
;
//
private String rxMessage;
public
static
final
String
ACTION_TX_FINISHED
=
"com.taiyoyuden.tyapp_terminal.ACTION_TX_FINISHED"
;
public
static
final
String
ACTION_TX_FINISHED
=
"com.taiyoyuden.tyapp_terminal.ACTION_TX_FINISHED"
;
public
static
final
String
ACTION_TX_ERROR
=
"com.taiyoyuden.tyapp_terminal.ACTION_TX_ERROR"
;
public
static
final
String
ACTION_TX_ERROR
=
"com.taiyoyuden.tyapp_terminal.ACTION_TX_ERROR"
;
...
@@ -138,12 +138,12 @@ public class AlcoholCheckerUtil {
...
@@ -138,12 +138,12 @@ public class AlcoholCheckerUtil {
// BLE管理
// BLE管理
bleManagerUtil
=
new
BleManagerUtil
(
context
,
new
BleManagerUtilListener
()
{
bleManagerUtil
=
new
BleManagerUtil
(
context
,
new
BleManagerUtilListener
()
{
@Override
//
@Override
public
void
onGetDeviceInfo
(
String
strTemperature
)
{
//
public void onGetDeviceInfo(String strTemperature) {
Logger
.
i
(
TAG
,
"------------------------------------"
);
//
Logger.i(TAG,"------------------------------------");
Logger
.
i
(
TAG
,
"onGetDeviceInfo = %s"
,
strTemperature
);
//
Logger.i(TAG,"onGetDeviceInfo = %s", strTemperature);
Logger
.
i
(
TAG
,
"------------------------------------"
);
//
Logger.i(TAG,"------------------------------------");
}
//
}
@Override
@Override
public
void
onGetDeviceInfoFailed
(
int
status
)
{
public
void
onGetDeviceInfoFailed
(
int
status
)
{
...
@@ -210,42 +210,19 @@ public class AlcoholCheckerUtil {
...
@@ -210,42 +210,19 @@ public class AlcoholCheckerUtil {
if
(
status
==
BluetoothGatt
.
GATT_SUCCESS
)
{
if
(
status
==
BluetoothGatt
.
GATT_SUCCESS
)
{
Logger
.
i
(
TAG
,
"------------------------------------------------------ BluetoothGatt.GATT_SUCCESS"
);
Logger
.
i
(
TAG
,
"------------------------------------------------------ BluetoothGatt.GATT_SUCCESS"
);
Logger
.
i
(
TAG
,
"BluetoothGatt.GATT_SUCCESS"
);
Logger
.
i
(
TAG
,
"BluetoothGatt.GATT_SUCCESS"
);
// for (BluetoothGattService svc : gatt.getServices()){
// //Log.d(TAG,svc.getUuid().toString());
// System.out.println("" + svc.getUuid().toString());
// }
//listener.onFugoAction(ACTION_GATT_SERVICES,null, null, null, null);
Logger
.
i
(
TAG
,
"ACTION_GATT_SERVICES"
);
// Check if the required services are available
// Check if this is a Taiyo Yuden device
TaiyoYudenService
=
bleManagerUtil
.
mBluetoothGatt
.
getService
(
TY_SERVICE_UUID
);
TaiyoYudenService
=
bleManagerUtil
.
mBluetoothGatt
.
getService
(
TY_SERVICE_UUID
);
if
(
TaiyoYudenService
==
null
)
{
if
(
TaiyoYudenService
==
null
)
{
Logger
.
i
(
TAG
,
"Not a TaiyoYuden device"
);
Logger
.
e
(
TAG
,
"Not a TaiyoYuden device"
);
//Toast.makeText(getApplicationContext(), "Not a TaiyoYuden device", Toast.LENGTH_SHORT).show();
//mService.disconnectDevice();
}
else
{
}
else
{
// Check TX and RX UUIDs
// Check TX and RX UUIDs
// BluetoothGattCharacteristic RxChar = TaiyoYudenService.getCharacteristic(RX_CHARACTERISTIC_UUID);
// BluetoothGattCharacteristic TxChar = TaiyoYudenService.getCharacteristic(TX_CHARACTERISTIC_UUID);
RxChar
=
TaiyoYudenService
.
getCharacteristic
(
RX_CHARACTERISTIC_UUID
);
RxChar
=
TaiyoYudenService
.
getCharacteristic
(
RX_CHARACTERISTIC_UUID
);
TxChar
=
TaiyoYudenService
.
getCharacteristic
(
TX_CHARACTERISTIC_UUID
);
TxChar
=
TaiyoYudenService
.
getCharacteristic
(
TX_CHARACTERISTIC_UUID
);
// if (RxChar == null || TxChar == null) {
if
(
RxChar
==
null
||
TxChar
==
null
)
{
if
(
RxChar
==
null
||
TxChar
==
null
)
{
// TaiyoYuden device doesn't support Tx/Rx communication
Logger
.
e
(
TAG
,
"No Tx/Rx"
);
System
.
out
.
println
(
"No Tx/Rx"
);
//Toast.makeText(getApplicationContext(), "Device is not running terminal service", Toast.LENGTH_SHORT).show();
}
else
{
}
else
{
System
.
out
.
println
(
"Terminal Start..............................."
);
// @Info
//mListener.onStartFugo();
//Intent fugosmartdemo = new Intent(getApplicationContext(), FugoSmartDemo.class);
// Stop Bluetooth scanning while the terminal activity is open
//mService.stopScan(mLeScanCallback);
// Start terminal application
//startActivityForResult(fugosmartdemo, REQUEST_OPEN_TERMINAL);
gi_status
=
F_BLE_COM_INIT
;
gi_status
=
F_BLE_COM_INIT
;
//((TextView)findViewById(R.id.txtStatus)).setText("F_BLE_COM_INIT");
gi_rxlength
=
0
;
gi_rxlength
=
0
;
gf_result_flg
=
false
;
gf_result_flg
=
false
;
...
@@ -262,8 +239,6 @@ public class AlcoholCheckerUtil {
...
@@ -262,8 +239,6 @@ public class AlcoholCheckerUtil {
bleManagerUtil
.
readPhyConnection
();
bleManagerUtil
.
readPhyConnection
();
rxMessage
=
""
;
bleManagerUtil
.
mBluetoothGatt
.
setCharacteristicNotification
(
NotificationChar
,
true
);
bleManagerUtil
.
mBluetoothGatt
.
setCharacteristicNotification
(
NotificationChar
,
true
);
BluetoothGattDescriptor
notification_descriptor
=
NotificationChar
.
getDescriptor
(
CCCD
);
BluetoothGattDescriptor
notification_descriptor
=
NotificationChar
.
getDescriptor
(
CCCD
);
notification_descriptor
.
setValue
(
BluetoothGattDescriptor
.
ENABLE_NOTIFICATION_VALUE
);
notification_descriptor
.
setValue
(
BluetoothGattDescriptor
.
ENABLE_NOTIFICATION_VALUE
);
...
@@ -274,7 +249,7 @@ public class AlcoholCheckerUtil {
...
@@ -274,7 +249,7 @@ public class AlcoholCheckerUtil {
Thread
thread
=
new
Thread
(
new
Runnable
()
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
timer
();
timer
Start
();
}
}
});
});
thread
.
start
();
thread
.
start
();
...
@@ -282,9 +257,8 @@ public class AlcoholCheckerUtil {
...
@@ -282,9 +257,8 @@ public class AlcoholCheckerUtil {
}
}
listener
.
onServicesDiscovered
(
status
);
listener
.
onServicesDiscovered
(
status
);
//mIsBluetoothEnable = true;
}
else
{
}
else
{
//System.out.println("onServicesDiscovered received: " + status
);
Logger
.
d
(
TAG
,
""
);
}
}
}
}
...
@@ -318,22 +292,26 @@ public class AlcoholCheckerUtil {
...
@@ -318,22 +292,26 @@ public class AlcoholCheckerUtil {
if
(!
bleManagerUtil
.
startDeviceInfo
())
{
if
(!
bleManagerUtil
.
startDeviceInfo
())
{
return
false
;
return
false
;
}
}
// 状態管理タイマースタート
//timerStart();
// alcoholCheckerTimerTask = new AlcoholCheckerTimerTask(context, listener);
// Timer timer = new Timer(true);
// timer.schedule(alcoholCheckerTimerTask, 0, 1000);
return
true
;
return
true
;
}
}
private
void
timer
()
{
/**
* アルコールチェッカーを監視するタイマーを開始する
*/
private
void
timerStart
()
{
if
(
alcoholCheckerTimerTask
!=
null
)
{
alcoholCheckerTimerTask
.
cancel
();
alcoholCheckerTimerTask
=
null
;
}
alcoholCheckerTimerTask
=
new
AlcoholCheckerTimerTask
(
this
,
listener
);
alcoholCheckerTimerTask
=
new
AlcoholCheckerTimerTask
(
this
,
listener
);
Timer
timer
=
new
Timer
(
true
);
Timer
timer
=
new
Timer
(
true
);
timer
.
schedule
(
alcoholCheckerTimerTask
,
0
,
1000
);
timer
.
schedule
(
alcoholCheckerTimerTask
,
0
,
1000
);
}
}
private
void
init
()
{
private
void
init
()
{
rxMessage
=
""
;
//
rxMessage = "";
bleManagerUtil
.
mBluetoothGatt
.
setCharacteristicNotification
(
NotificationChar
,
true
);
bleManagerUtil
.
mBluetoothGatt
.
setCharacteristicNotification
(
NotificationChar
,
true
);
BluetoothGattDescriptor
notification_descriptor
=
NotificationChar
.
getDescriptor
(
CCCD
);
BluetoothGattDescriptor
notification_descriptor
=
NotificationChar
.
getDescriptor
(
CCCD
);
...
@@ -350,6 +328,10 @@ public class AlcoholCheckerUtil {
...
@@ -350,6 +328,10 @@ public class AlcoholCheckerUtil {
// 切断
// 切断
public
void
disconnect
(
boolean
listenerFlg
)
{
public
void
disconnect
(
boolean
listenerFlg
)
{
bleManagerUtil
.
disconnect
(
listenerFlg
);
bleManagerUtil
.
disconnect
(
listenerFlg
);
if
(
alcoholCheckerTimerTask
!=
null
)
{
alcoholCheckerTimerTask
.
cancel
();
alcoholCheckerTimerTask
=
null
;
}
}
}
...
@@ -787,7 +769,8 @@ public class AlcoholCheckerUtil {
...
@@ -787,7 +769,8 @@ public class AlcoholCheckerUtil {
str_msg
+=
"[mg/L]"
;
str_msg
+=
"[mg/L]"
;
//((TextView)findViewById(R.id.TBV_Calc)).setText(str_msg); // @
//((TextView)findViewById(R.id.TBV_Calc)).setText(str_msg); // @
listener
.
onUpdateTBVCalc
(
str_msg
+
" 0x0C 測定結果表示状態"
);
//listener.onUpdateTBVCalc(str_msg + " 0x0C 測定結果表示状態");
listener
.
onGetDeviceInfo
(
str_msg
);
}
else
{
}
else
{
// Error
// Error
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
View file @
b71b72a9
...
@@ -43,8 +43,8 @@ public class BleManagerUtil {
...
@@ -43,8 +43,8 @@ public class BleManagerUtil {
// 定数(Bluetooth LE Gatt UUID)
// 定数(Bluetooth LE Gatt UUID)
// Private Service
// Private Service
private
UUID
UUID_SERVICE_PRIVATE
;
//
private UUID UUID_SERVICE_PRIVATE;
private
UUID
UUID_CHARACTERISTIC_PRIVATE
;
//
private UUID UUID_CHARACTERISTIC_PRIVATE;
// for Notification
// for Notification
private
UUID
UUID_NOTIFY
;
private
UUID
UUID_NOTIFY
;
...
@@ -127,6 +127,7 @@ public class BleManagerUtil {
...
@@ -127,6 +127,7 @@ public class BleManagerUtil {
}
}
mBluetoothGatt
.
requestConnectionPriority
(
BluetoothGatt
.
CONNECTION_PRIORITY_HIGH
);
mBluetoothGatt
.
requestConnectionPriority
(
BluetoothGatt
.
CONNECTION_PRIORITY_HIGH
);
// アルコールチェッカー
if
(
mBleConnectDeviceType
==
Constant
.
DeviceType
.
alcoholChecker
)
{
if
(
mBleConnectDeviceType
==
Constant
.
DeviceType
.
alcoholChecker
)
{
mListener
.
onServicesDiscovered
(
status
);
mListener
.
onServicesDiscovered
(
status
);
return
;
return
;
...
@@ -147,32 +148,31 @@ public class BleManagerUtil {
...
@@ -147,32 +148,31 @@ public class BleManagerUtil {
}
}
// プライベートサービス
// プライベートサービス
if
(
UUID_SERVICE_PRIVATE
.
equals
(
service
.
getUuid
()))
{
//
if(UUID_SERVICE_PRIVATE.equals(service.getUuid())) {
// 最初の読み取り
//
// 最初の読み取り
readCharacteristic
(
UUID_SERVICE_PRIVATE
,
UUID_CHARACTERISTIC_PRIVATE
);
//
readCharacteristic(UUID_SERVICE_PRIVATE, UUID_CHARACTERISTIC_PRIVATE);
//
runOnUiThread
(
new
Runnable
()
{
//
runOnUiThread( new Runnable() {
@Override
//
@Override
public
void
run
()
{
//
public void run() {
// 操作可能
//
// 操作可能
mListener
.
onConnectionState
(
status
);
//
mListener.onConnectionState(status);
}
//
}
});
//
});
continue
;
//
continue;
}
//
}
}
}
}
}
// キャラクタリスティックが読み込まれたときの処理
// キャラクタリスティックが読み込まれたときの処理
@Override
//
@Override
public
void
onCharacteristicRead
(
BluetoothGatt
gatt
,
BluetoothGattCharacteristic
characteristic
,
int
status
)
{
//
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status ) {
Logger
.
i
(
TAG
,
"onCharacteristicChanged"
);
//
Logger.i(TAG,"onCharacteristicChanged");
if
(
BluetoothGatt
.
GATT_SUCCESS
!=
status
)
{
//
if( BluetoothGatt.GATT_SUCCESS != status ) {
return
;
//
return;
}
//
}
if
(
UUID_CHARACTERISTIC_PRIVATE
.
equals
(
characteristic
.
getUuid
()))
{
//
if( UUID_CHARACTERISTIC_PRIVATE.equals(characteristic.getUuid())) {
// final String strTemperature = byteToString(characteristic.getValue());
// final String strTemperature = byteToString(characteristic.getValue());
// runOnUiThread( new Runnable() {
// runOnUiThread( new Runnable() {
// @Override
// @Override
// public void run() {
// public void run() {
...
@@ -181,12 +181,11 @@ public class BleManagerUtil {
...
@@ -181,12 +181,11 @@ public class BleManagerUtil {
//// mListener.onGetDeviceInfo(strTemperature);
//// mListener.onGetDeviceInfo(strTemperature);
// }
// }
// });
// });
// // 通知設定
// 通知設定
// setCharacteristicNotification(UUID_SERVICE_PRIVATE, UUID_CHARACTERISTIC_PRIVATE, true);
setCharacteristicNotification
(
UUID_SERVICE_PRIVATE
,
UUID_CHARACTERISTIC_PRIVATE
,
true
);
// return;
return
;
// }
}
// }
}
// キャラクタリスティック変更が通知されたときの処理
// キャラクタリスティック変更が通知されたときの処理
@Override
@Override
...
@@ -196,22 +195,22 @@ public class BleManagerUtil {
...
@@ -196,22 +195,22 @@ public class BleManagerUtil {
mListener
.
onCharacteristicChanged
(
gatt
,
characteristic
);
mListener
.
onCharacteristicChanged
(
gatt
,
characteristic
);
return
;
return
;
}
}
if
(
UUID_CHARACTERISTIC_PRIVATE
.
equals
(
characteristic
.
getUuid
()
)
)
{
//
if( UUID_CHARACTERISTIC_PRIVATE.equals( characteristic.getUuid() ) ) {
final
String
strTemperature
=
byteToString
(
characteristic
.
getValue
());
//
final String strTemperature = byteToString(characteristic.getValue());
//
runOnUiThread
(
new
Runnable
()
{
//
runOnUiThread( new Runnable() {
@Override
//
@Override
public
void
run
()
{
//
public void run() {
// 複数呼ばれるため、mBluetoothGattがnullの場合、以下の処理を行わない
//
// 複数呼ばれるため、mBluetoothGattがnullの場合、以下の処理を行わない
if
(
mBluetoothGatt
==
null
)
{
//
if(mBluetoothGatt == null) {
return
;
//
return;
}
//
}
// 芯温計の温度を渡す。
//
// 芯温計の温度を渡す。
mListener
.
onGetDeviceInfo
(
strTemperature
);
//
mListener.onGetDeviceInfo(strTemperature);
}
//
}
});
//
});
return
;
//
return;
}
//
}
}
}
};
};
...
@@ -396,9 +395,9 @@ public class BleManagerUtil {
...
@@ -396,9 +395,9 @@ public class BleManagerUtil {
*/
*/
public
boolean
startDeviceInfo
()
{
public
boolean
startDeviceInfo
()
{
// Bluetoothアダプタの取得
// Bluetoothアダプタの取得
BluetoothManager
bluetoothManager
=
(
BluetoothManager
)
mContext
.
getSystemService
(
Context
.
BLUETOOTH_SERVICE
);
BluetoothManager
bluetoothManager
2
=
(
BluetoothManager
)
mContext
.
getSystemService
(
Context
.
BLUETOOTH_SERVICE
);
if
(
bluetoothManager
!=
null
)
{
if
(
bluetoothManager
2
!=
null
)
{
mBluetoothAdapter
=
bluetoothManager
.
getAdapter
();
mBluetoothAdapter
=
bluetoothManager
2
.
getAdapter
();
if
(
mBluetoothAdapter
==
null
)
{
// Android端末がBluetoothをサポートしていない
if
(
mBluetoothAdapter
==
null
)
{
// Android端末がBluetoothをサポートしていない
Toast
.
makeText
(
mContext
,
R
.
string
.
bluetooth_is_not_supported
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
mContext
,
R
.
string
.
bluetooth_is_not_supported
,
Toast
.
LENGTH_SHORT
).
show
();
return
false
;
return
false
;
...
@@ -412,15 +411,15 @@ public class BleManagerUtil {
...
@@ -412,15 +411,15 @@ public class BleManagerUtil {
// UUIDセット
// UUIDセット
private
void
setUUID
()
{
private
void
setUUID
()
{
if
(
mBleConnectDeviceType
==
Constant
.
DeviceType
.
centerThermomete
)
{
//
if (mBleConnectDeviceType == Constant.DeviceType.centerThermomete) {
// 中心温度計のUUIDセット
//
// 中心温度計のUUIDセット
UUID_SERVICE_PRIVATE
=
UUID
.
fromString
(
"05fd8c58-9d23-11e7-abc4-cec278b6b50a"
);
//
UUID_SERVICE_PRIVATE = UUID.fromString("05fd8c58-9d23-11e7-abc4-cec278b6b50a");
UUID_CHARACTERISTIC_PRIVATE
=
UUID
.
fromString
(
"05fd8f5a-9d23-11e7-abc4-cec278b6b50a"
);
//
UUID_CHARACTERISTIC_PRIVATE = UUID.fromString("05fd8f5a-9d23-11e7-abc4-cec278b6b50a");
}
else
if
(
mBleConnectDeviceType
==
Constant
.
DeviceType
.
radiationThermomete
)
{
//
} else if (mBleConnectDeviceType == Constant.DeviceType.radiationThermomete) {
// 放射温度計のUUIDセット
//
// 放射温度計のUUIDセット
UUID_SERVICE_PRIVATE
=
UUID
.
fromString
(
"462026f6-cfe1-11e7-abc4-cec278b6b50a"
);
//
UUID_SERVICE_PRIVATE = UUID.fromString("462026f6-cfe1-11e7-abc4-cec278b6b50a");
UUID_CHARACTERISTIC_PRIVATE
=
UUID
.
fromString
(
"46202b74-cfe1-11e7-abc4-cec278b6b50a"
);
//
UUID_CHARACTERISTIC_PRIVATE = UUID.fromString("46202b74-cfe1-11e7-abc4-cec278b6b50a");
}
//
}
}
}
/**
/**
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtilListener.java
View file @
b71b72a9
...
@@ -4,7 +4,7 @@ import android.bluetooth.BluetoothGatt;
...
@@ -4,7 +4,7 @@ import android.bluetooth.BluetoothGatt;
import
android.bluetooth.BluetoothGattCharacteristic
;
import
android.bluetooth.BluetoothGattCharacteristic
;
public
interface
BleManagerUtilListener
{
public
interface
BleManagerUtilListener
{
void
onGetDeviceInfo
(
String
strTemperature
);
// ディバイスから渡す情報
//
void onGetDeviceInfo(String strTemperature); // ディバイスから渡す情報
void
onGetDeviceInfoFailed
(
int
status
);
// ディバイスと接続失敗時の情報渡す。
void
onGetDeviceInfoFailed
(
int
status
);
// ディバイスと接続失敗時の情報渡す。
void
onConnectionState
(
int
status
);
// ディバイスと接続された時情報渡す。
void
onConnectionState
(
int
status
);
// ディバイスと接続された時情報渡す。
void
onDisConnectionState
();
// ディバイスと切断時
void
onDisConnectionState
();
// ディバイスと切断時
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
b71b72a9
...
@@ -21,6 +21,7 @@ import android.view.View;
...
@@ -21,6 +21,7 @@ import android.view.View;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
...
@@ -184,8 +185,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -184,8 +185,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
//待ち状態の時画面に表示するダイアログ
//待ち状態の時画面に表示するダイアログ
protected
ABookAlertDialog
mWaitingDialog
;
protected
ABookAlertDialog
mWaitingDialog
;
// 計測用ダイアログ
// 計測用ダイアログ
private
ABookAlertDialog
mWaitMeasureDialog
;
// 息を吹きかけてください
private
ABookAlertDialog
mMeasureDialog
;
private
ABookAlertDialog
mMeasureDialog
;
// デバイスタイプ 0 アルコールチェッカー
private
int
mDeviceType
;
// 設問ID
private
String
mQid
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -320,7 +328,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -320,7 +328,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
i
(
TAG
,
"onUpdateTBVCalc = %s"
,
text
);
Logger
.
i
(
TAG
,
"onUpdateTBVCalc = %s"
,
text
);
Logger
.
i
(
TAG
,
"------------------------------------"
);
Logger
.
i
(
TAG
,
"------------------------------------"
);
alcoholCheckerUtil
.
sendMessage
(
AlcoholCheckerUtil
.
F_BLE_COM_FC_COMMAND
);
//
alcoholCheckerUtil.sendMessage(AlcoholCheckerUtil.F_BLE_COM_FC_COMMAND);
}
}
@Override
@Override
...
@@ -350,9 +358,43 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -350,9 +358,43 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
i
(
TAG
,
"onServicesDiscovered = %s"
,
status
);
Logger
.
i
(
TAG
,
"onServicesDiscovered = %s"
,
status
);
Logger
.
i
(
TAG
,
"------------------------------------"
);
Logger
.
i
(
TAG
,
"------------------------------------"
);
Logger
.
i
(
TAG
,
"ACTION_GATT_SERVICES"
);
Logger
.
i
(
TAG
,
"ACTION_GATT_SERVICES"
);
mIsConnection
=
true
;
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
//mWaitingDialog.setMessage("接続しましたボタンをおしてください");
//Button btn = mWaitingDialog.getButton(DialogInterface.BUTTON_POSITIVE);
//btn.setText("うんこ");
if
(
mWaitingDialog
!=
null
)
{
mWaitingDialog
.
dismiss
();
mWaitingDialog
=
null
;
}
showWaitMeasureDialog
(
"aaaaaa"
,
"aaaaaaaaaaaaaaaaaaaaaaaaaaa"
);
}
});
}
@Override
public
void
onGetDeviceInfo
(
String
alcohol
)
{
/// 測定値
if
(
mWaitingDialog
!=
null
)
{
mWaitingDialog
.
dismiss
();
mWaitingDialog
=
null
;
}
if
(
mWaitMeasureDialog
!=
null
)
{
mWaitMeasureDialog
.
dismiss
();
mWaitMeasureDialog
=
null
;
}
if
(
mMeasureDialog
!=
null
)
{
mMeasureDialog
.
dismiss
();
mMeasureDialog
=
null
;
}
}
}
});
});
if
(!
alcoholCheckerUtil
.
startGetDeviceInfo
())
{
if
(!
alcoholCheckerUtil
.
startGetDeviceInfo
())
{
// 端末がBluetoothをサポートしていないなどの理由で、アルコールチェッカーが使えない
// 端末がBluetoothをサポートしていないなどの理由で、アルコールチェッカーが使えない
Logger
.
e
(
TAG
,
"bluetooth damedame."
);
Logger
.
e
(
TAG
,
"bluetooth damedame."
);
...
@@ -1084,17 +1126,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1084,17 +1126,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
//bleManagerUtil.disconnect(true);
//bleManagerUtil.disconnect(true);
}
}
private
void
alcoholCheckerUtilbleManagerDisconnect
(
boolean
disconnect
)
{
//
private void alcoholCheckerUtilbleManagerDisconnect(boolean disconnect) {
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
//
Logger.d(TAG,"-------------------------------------------------");
Logger
.
d
(
TAG
,
"bleManagerDisconnect = "
+
disconnect
);
//
Logger.d(TAG, "bleManagerDisconnect = " + disconnect);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
//
Logger.d(TAG,"-------------------------------------------------");
if
(
disconnect
){
//
if (disconnect){
mIsConnection
=
false
;
//
mIsConnection = false;
alcoholCheckerUtil
.
disconnect
(
true
);
//
alcoholCheckerUtil.disconnect(true);
}
else
{
//
} else {
// 何もしない
//
// 何もしない
}
//
}
}
//
}
/**
/**
* 各デバイスから値を正常に取得された場合、HTML側にコールする
* 各デバイスから値を正常に取得された場合、HTML側にコールする
...
@@ -1108,8 +1150,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1108,8 +1150,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
i
(
TAG
,
"successAfterAbookCheckAip JSON [%s]"
,
responseJson
.
toString
());
Logger
.
i
(
TAG
,
"successAfterAbookCheckAip JSON [%s]"
,
responseJson
.
toString
());
}
}
private
int
status
=
0
;
/**
/**
*
中心温度計、置くだけセンサー接続の待機、TR41温度センサースキャン中、ダイヤログ表示
*
接続待ち
* @param title タイトル
* @param title タイトル
* @param message 内容
* @param message 内容
*/
*/
...
@@ -1117,53 +1161,20 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1117,53 +1161,20 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"showWaitingDialog"
);
Logger
.
i
(
TAG
,
"showWaitingDialog"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
//待機状態のダイヤログ表示
mWaitingDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
title
);
mWaitingDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
title
);
mWaitingDialog
.
setMessage
(
message
);
mWaitingDialog
.
setMessage
(
message
);
mWaitingDialog
.
setButton
(
DialogInterface
.
BUTTON_POSITIVE
,
getResources
().
getString
(
R
.
string
.
pairing_search_stop
),
new
DialogInterface
.
OnClickListener
()
{
mWaitingDialog
.
setButton
(
DialogInterface
.
BUTTON_POSITIVE
,
getResources
().
getString
(
R
.
string
.
pairing_search_stop
),
new
DialogInterface
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
Logger
.
i
(
TAG
,
"waiting Dialog stop click : "
+
mDeviceType
);
Logger
.
i
(
TAG
,
"waiting Dialog stop click : "
+
mDeviceType
);
switch
(
mDeviceType
)
{
if
(
mDeviceType
==
Constant
.
DeviceType
.
alcoholChecker
)
{
case
Constant
.
DeviceType
.
centerThermomete
:
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
case
Constant
.
DeviceType
.
radiationThermomete
:
Logger
.
i
(
TAG
,
"アルコールチェッカー接続待中止"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"放射・中心温度計 アルコールチェッカー接続待中止"
);
alcoholCheckerUtil
.
disconnect
(
true
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
alcoholCheckerUtilbleManagerDisconnect
(
true
);
// 放射温度計、中心温度計接続切断
break
;
case
Constant
.
DeviceType
.
alcoholChecker
:
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"アルコールチェッカー接続待中止"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
alcoholCheckerUtilbleManagerDisconnect
(
true
);
break
;
// case Constant.DeviceType.sensor:
// stopOkudakeBeaconScan(); // 置くだけセンサースキャン中止
// break;
// case Constant.DeviceType.sppBluetoothMachine:
// disConnectSppBluetooth();
// // 接続を切るのに5秒ぐらい必要なので、プログレスバーを表示して5秒後に閉じる
// showProgressPopup(getString(R.string.msg_common_processing));
// handler.postDelayed( new Runnable() {
// @Override
// public void run() {
// closeProgressPopup();
// }
// }, 5000 );
// break;
// case Constant.DeviceType.nfc: // nfc
// // Activityがバックグラウンドになったときは、受け取らない
// mNfcAdapter.disableForegroundDispatch(ABVCheckContentViewActivity.this);
// break;
// case Constant.DeviceType.tr41: // TR41温度センサー
// Logger.d(TAG,"-------------------------------------------------");
// Logger.d(TAG,"TR41温度センサー スキャン中止");
// Logger.d(TAG,"-------------------------------------------------");
// stopTR41BeaconScan();
// break;
}
}
successAfterAbookCheckAip
(
""
);
successAfterAbookCheckAip
(
""
);
mWaitingDialog
.
dismiss
();
mWaitingDialog
=
null
;
mWaitingDialog
=
null
;
}
}
});
});
...
@@ -1171,6 +1182,99 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1171,6 +1182,99 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
/**
/**
* 接続待ち
* @param title タイトル
* @param message 内容
*/
private
void
showWaitMeasureDialog
(
String
title
,
String
message
)
{
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"showWaitMeasureDialog"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
mWaitMeasureDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
title
);
mWaitMeasureDialog
.
setMessage
(
"接続しました。ボタンをおしてください"
);
mWaitMeasureDialog
.
setButton
(
DialogInterface
.
BUTTON_POSITIVE
,
"測定開始"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
Logger
.
i
(
TAG
,
"waiting mWaitMeasureDialog stop click : "
+
mDeviceType
);
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
//showMeasureDialog("banban","banban");
//alcoholCheckerUtil.sendMessage(AlcoholCheckerUtil.F_BLE_COM_FC_COMMAND);
}
});
showMeasureDialog
(
"banban"
,
"banban"
);
alcoholCheckerUtil
.
sendMessage
(
AlcoholCheckerUtil
.
F_BLE_COM_FC_COMMAND
);
mWaitMeasureDialog
.
dismiss
();
mWaitMeasureDialog
=
null
;
}
});
}
});
mWaitMeasureDialog
.
setButton
(
DialogInterface
.
BUTTON_NEGATIVE
,
"キャンセル"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
Logger
.
i
(
TAG
,
"waiting mWaitMeasureDialog stop click : "
+
mDeviceType
);
alcoholCheckerUtil
.
disconnect
(
true
);
successAfterAbookCheckAip
(
""
);
mWaitMeasureDialog
.
dismiss
();
mWaitMeasureDialog
=
null
;
}
});
mWaitMeasureDialog
.
show
();
}
/**
* 接続待ち
* @param title タイトル
* @param message 内容
*/
private
void
showMeasureDialog
(
String
title
,
String
message
)
{
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"showMeasureDialog"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
mMeasureDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
title
);
mMeasureDialog
.
setMessage
(
"息を吹きかけてください"
);
mMeasureDialog
.
setButton
(
DialogInterface
.
BUTTON_NEGATIVE
,
"測定中止"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
Logger
.
i
(
TAG
,
"waiting Dialog stop click : "
+
mDeviceType
);
if
(
mDeviceType
==
Constant
.
DeviceType
.
alcoholChecker
)
{
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
Logger
.
i
(
TAG
,
"測定中止"
);
Logger
.
i
(
TAG
,
"-------------------------------------------------"
);
}
alcoholCheckerUtil
.
disconnect
(
true
);
successAfterAbookCheckAip
(
""
);
mMeasureDialog
.
dismiss
();
mMeasureDialog
=
null
;
}
});
// mMeasureDialog.setButton(DialogInterface.BUTTON_POSITIVE, "測定中止", new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// Logger.i(TAG, "waiting Dialog stop click : " + mDeviceType);
// if (mDeviceType == Constant.DeviceType.alcoholChecker) {
//
// alcoholCheckerUtil.disconnect(true);
// }
// successAfterAbookCheckAip("");
// mMeasureDialog.dismiss();
// mMeasureDialog = null;
// }
// });
mMeasureDialog
.
show
();
}
/**
* 各デバイスからエラー(接続不能など)発生した場合、HTML側にコールする
* 各デバイスからエラー(接続不能など)発生した場合、HTML側にコールする
* @param errorMessage 各種デバイスから取得した値
* @param errorMessage 各種デバイスから取得した値
*/
*/
...
@@ -1178,32 +1282,33 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1178,32 +1282,33 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
afterABookCheckApi
(
mCmd
,
""
,
1
,
errorMessage
,
null
);
afterABookCheckApi
(
mCmd
,
""
,
1
,
errorMessage
,
null
);
}
}
/**
/**
*
Android端末のBluetooth機能の有効化要求
*
アルコールチェッカー処理
* @
return true:bluetooth ON, false:bluetooth OFF
* @
param abookCheckParam
*/
*/
private
boolean
requestBluetoothFeature
(
int
requestCode
)
{
private
void
getDeviceInfo
(
Map
<
String
,
String
>
abookCheckParam
)
{
if
(
alcoholCheckerUtil
.
bleManagerUtil
.
mBluetoothAdapter
.
isEnabled
())
{
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
return
true
;
Logger
.
d
(
TAG
,
"getDeviceInfo"
);
}
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
// デバイスのBluetooth機能が有効になっていないときは、有効化要求(ダイアログ表示)
Intent
enableBtIntent
=
new
Intent
(
BluetoothAdapter
.
ACTION_REQUEST_ENABLE
);
mDeviceType
=
Constant
.
DeviceType
.
alcoholChecker
;
startActivityForResult
(
enableBtIntent
,
requestCode
);
mQid
=
"1"
;
return
false
;
connectToAlcholChecker
();
}
}
/**
/**
* BLEディバイスのアルコールチェッカーの情報取得
* BLEディバイスのアルコールチェッカーの情報取得
*/
*/
private
void
initGetDeviceInfo
()
{
private
void
connectToAlcholChecker
()
{
if
(
requestBluetoothFeature
(
REQUEST_CODE_ENABLEBLUETOOTH_ALCOHL_CHECKER
))
{
//端末のBluetooth設定を確認
if
(
requestBluetoothFeature
(
REQUEST_CODE_ENABLEBLUETOOTH_ALCOHL_CHECKER
))
{
//端末のBluetooth設定を確認
String
deviceAddress
=
getABVUIDataCache
().
getPairingBluetoothDeviceAddress
(
Constant
.
DeviceType
.
alcoholChecker
);
String
deviceAddress
=
getABVUIDataCache
().
getPairingBluetoothDeviceAddress
(
Constant
.
DeviceType
.
alcoholChecker
);
if
(
StringUtil
.
isNullOrEmpty
(
deviceAddress
))
{
if
(
StringUtil
.
isNullOrEmpty
(
deviceAddress
))
{
// 登録されている
中心温度計がない場合
// 登録されている
アルコールチェッカーが無い場合はエラー
errorAfterAbookCheckAip
(
getString
(
R
.
string
.
msg_pairing_device_no_info
));
errorAfterAbookCheckAip
(
getString
(
R
.
string
.
msg_pairing_device_no_info
));
return
;
return
;
// 以下の処理にかからないようにreturnする
}
}
if
(
mIsConnection
)
{
if
(
mIsConnection
)
{
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
...
@@ -1211,12 +1316,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1211,12 +1316,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
String
message
=
String
.
format
(
getString
(
R
.
string
.
msg_ble_connect_success
),
getString
(
R
.
string
.
alcohl_checker
));
String
message
=
String
.
format
(
getString
(
R
.
string
.
msg_ble_connect_success
),
getString
(
R
.
string
.
alcohl_checker
));
showWaitingDialog
(
getString
(
R
.
string
.
alcohl_checker
),
message
);
showWaitingDialog
(
getString
(
R
.
string
.
alcohl_checker
),
message
);
}
else
{
}
else
{
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"isConnection = false"
);
Logger
.
d
(
TAG
,
"isConnection = false"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
// 登録されている
中心温度計
がある
// 登録されている
アルコールチェッカー
がある
showWaitingDialog
(
getString
(
R
.
string
.
alcohl_checker
),
getString
(
R
.
string
.
ble_connecting
));
showWaitingDialog
(
getString
(
R
.
string
.
alcohl_checker
),
getString
(
R
.
string
.
ble_connecting
));
// 接続
// 接続
alcoholCheckerUtil
.
connect
(
Constant
.
DeviceType
.
alcoholChecker
,
deviceAddress
);
alcoholCheckerUtil
.
connect
(
Constant
.
DeviceType
.
alcoholChecker
,
deviceAddress
);
...
@@ -1224,17 +1328,18 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1224,17 +1328,18 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
}
}
private
int
mDeviceType
;
/**
private
String
mQid
;
* Android端末のBluetooth機能の有効化要求
private
void
getDeviceInfo
(
Map
<
String
,
String
>
abookCheckParam
)
{
* @return true:bluetooth ON, false:bluetooth OFF
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
*/
Logger
.
d
(
TAG
,
"getDeviceInfo"
);
private
boolean
requestBluetoothFeature
(
int
requestCode
)
{
Logger
.
d
(
TAG
,
"-------------------------------------------------"
);
if
(
alcoholCheckerUtil
.
bleManagerUtil
.
mBluetoothAdapter
.
isEnabled
())
{
return
true
;
mDeviceType
=
Constant
.
DeviceType
.
alcoholChecker
;
}
mQid
=
"1"
;
// デバイスのBluetooth機能が有効になっていないときは、有効化要求(ダイアログ表示)
Intent
enableBtIntent
=
new
Intent
(
BluetoothAdapter
.
ACTION_REQUEST_ENABLE
);
initGetDeviceInfo
();
startActivityForResult
(
enableBtIntent
,
requestCode
);
return
false
;
}
}
/**
/**
...
@@ -1254,12 +1359,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1254,12 +1359,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_KEY
))
{
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_KEY
))
{
mTaskKey
=
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
);
mTaskKey
=
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
);
}
}
// アルコールチェッカーテスト
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_CANCEL_TASK_REPORT
))
{
//mCmd = ABookKeys.CMD_GET_DEVICE_INFO;
getDeviceInfo
(
abookCheckParam
);
return
;
}
int
taskReportLevel
=
0
;
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
int
taskReportLevel
=
0
;
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_REPORT_LEVEL
))
{
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_REPORT_LEVEL
))
{
...
@@ -1532,6 +1631,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1532,6 +1631,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger
.
i
(
TAG
,
"save taskKey = "
+
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
));
Logger
.
i
(
TAG
,
"save taskKey = "
+
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
));
Logger
.
i
(
TAG
,
"save userData = "
+
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
Logger
.
i
(
TAG
,
"save userData = "
+
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
saveUserDataKey
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
),
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
saveUserDataKey
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
),
abookCheckParam
.
get
(
ABookKeys
.
USER_DATA
));
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_GET_DEVICE_INFO
))
{
Logger
.
i
(
TAG
,
"getDeviceInfo"
);
getDeviceInfo
(
abookCheckParam
);
}
}
}
}
...
...
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