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
610de350
Commit
610de350
authored
May 20, 2019
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32914 中心温度計
ユーザ切り替え時に以前保存された温度計情報を初期化後保存処理
parent
3d5ed33d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
47 deletions
+40
-47
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+1
-14
ABVJE_Res_Default_Android/res/values-ko/strings.xml
+2
-10
ABVJE_Res_Default_Android/res/values/strings.xml
+1
-10
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
+1
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
+12
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
+23
-11
No files found.
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
610de350
...
...
@@ -1406,32 +1406,19 @@
<string
name=
"pairing_save_thermometer"
>
登録された温度計
</string>
<string
name=
"pairing_other_thermometer"
>
その他温度計
</string>
<string
name=
"pairing_other_thermometer_searching"
>
その他温度計(検索中..)
</string>
<string
name=
"ble_connect_fail"
>
接続失敗
</string>
<string
name=
"ble_disconnect"
>
未接続
</string>
<string
name=
"ble_connecting"
>
接続中..
</string>
<string
name=
"ble_connect_success"
>
接続済み
</string>
<string
name=
"msg_no_device_info"
>
登録された中心温度計情報がありません。\n設定画面のペアリングの中心温度計から登録できます。
</string>
<string
name=
"title_okudake_sensor"
>
置くだけセンサー
</string>
<string
name=
"msg_ble_connect_error"
>
登録した中心温度計と接続することができません。中心温度計の電源を確認した後、再度お試しください。(%s)
</string>
<string
name=
"msg_ble_connect_success"
>
中心温度計と接続になりました。中心温度計を操作してください。
</string>
<string
name=
"msg_scan_bluetooth_no_allow"
>
BlueToothの利用を「許可」しないと、中心温度計のスキャンができません。
</string>
<string
name=
"msg_thermometer_connect_bluetooth_no_allow"
>
BlueToothの利用を「許可」しないと、中心温度計と接続できません。
</string>
<string
name=
"msg_okudake_connect_bluetooth_no_allow"
>
BlueToothの利用を「許可」しないと、置くだけセンサーと接続できません。
</string>
<string
name=
"msg_okudake_location_device_no_allow"
>
端末の設定から位置情報をONにしてください。
</string>
<string
name=
"ble_is_not_supported"
>
BLEを支援しません。
</string>
<string
name=
"msg_location_device_no_allow"
>
端末の設定から位置情報をONにしてください。
</string>
<string
name=
"bluetooth_is_not_supported"
>
ブルートゥースを支援しません。
</string>
<string
name=
"msg_connected_bluetooth"
>
%sに接続されました。
</string>
<string
name=
"msg_ble_not_connect"
>
接続が停止しました。
</string>
<string
name=
"msg_permission_dialog_bluetooth"
>
ブルートゥース利用権限が必要です。\nアプリ設定画面へ遷移します。
</string>
<string
name=
"sensor"
>
センサー
</string>
<string
name=
"barcode"
>
バーコード
</string>
<string
name=
"msg_device_connecting"
>
ディバイスと接続中
</string>
</resources>
ABVJE_Res_Default_Android/res/values-ko/strings.xml
View file @
610de350
...
...
@@ -1425,15 +1425,8 @@
<string
name=
"msg_scan_bluetooth_no_allow"
>
블루투스 사용를 [허용] 하지 않으면, 중심 온도계 스캔이 불가능 합니다.
</string>
<string
name=
"msg_thermometer_connect_bluetooth_no_allow"
>
블루투스 사용를 [허용] 하지 않으면, 중심 온도계와 연결이 불가능 합니다.
</string>
<string
name=
"msg_okudake_connect_bluetooth_no_allow"
>
블루투스 사용를 [허용] 하지 않으면, 오쿠다케 센서와 연결이 불가능 합니다.
</string>
<string
name=
"msg_okudake_location_device_no_allow"
>
단말기의 설정에서 위치정보를 ON으로 설정해 주세요.
</string>
<string
name=
"ble_is_not_supported"
>
BLE는 지원되지 않습니다.
</string>
<string
name=
"msg_location_device_no_allow"
>
단말기의 설정에서 위치정보를 ON으로 설정해 주세요.
</string>
<string
name=
"bluetooth_is_not_supported"
>
블루투스는 지원되지 않습니다.
</string>
<string
name=
"msg_connected_bluetooth"
>
%s에 접속되었습니다
</string>
<string
name=
"msg_ble_not_connect"
>
접속이 정지되었습니다.
</string>
<string
name=
"msg_permission_dialog_bluetooth"
>
블루투스이용권한이 필요합니다.\n설정화면으로 이동합니다.
</string>
<string
name=
"sensor"
>
센서
</string>
<string
name=
"msg_permission_dialog_bluetooth"
>
블루투스이용권한이 필요합니다.\n앱 설정화면으로 이동합니다.
</string>
<string
name=
"barcode"
>
바코드
</string>
<string
name=
"msg_device_connecting"
>
기기와 접속중
</string>
</resources>
\ No newline at end of file
ABVJE_Res_Default_Android/res/values/strings.xml
View file @
610de350
...
...
@@ -1423,17 +1423,9 @@
<string
name=
"msg_scan_bluetooth_no_allow"
>
If Bluetooth is not allow, the center thermometer scan is disabled.
</string>
<string
name=
"msg_thermometer_connect_bluetooth_no_allow"
>
If Bluetooth is not allow, the center thermometer connect is disabled.
</string>
<string
name=
"msg_okudake_connect_bluetooth_no_allow"
>
If Bluetooth is not allow, the center okudake sensor connect is disabled.
</string>
<string
name=
"msg_okudake_location_device_no_allow"
>
Please set the location information to ON in the device setting.
</string>
<string
name=
"ble_is_not_supported"
>
BLE is not supported.
</string>
<string
name=
"msg_location_device_no_allow"
>
Please set the location information to ON in the device setting.
</string>
<string
name=
"bluetooth_is_not_supported"
>
Bluetooth is not supported.
</string>
<string
name=
"msg_connected_bluetooth"
>
Connected to %s
</string>
<string
name=
"msg_ble_not_connect"
>
The connection has stopped.
</string>
<string
name=
"msg_permission_dialog_bluetooth"
>
You need Bluetooth access authority. \nIt changes to the application setting.
</string>
<string
name=
"sensor"
>
Sensor
</string>
<string
name=
"barcode"
>
Barcode
</string>
<string
name=
"msg_device_connecting"
>
Connecting Device
</string>
</resources>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
View file @
610de350
...
...
@@ -176,7 +176,6 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
@Override
public
void
onDisConnectionState
()
{
// 中心温度計接続切断
Logger
.
d
(
TAG
,
"onDisConnectionState"
);
// ABVToastUtil.showMakeText(getApplicationContext(), getString(R.string.msg_ble_not_connect), Toast.LENGTH_SHORT);
setThermometerData
(
""
);
dismissWaitngDialog
();
}
...
...
@@ -306,7 +305,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
}
}
}
else
{
errorAfterAbookCheckAip
(
getString
(
R
.
string
.
msg_
okudake_
location_device_no_allow
));
errorAfterAbookCheckAip
(
getString
(
R
.
string
.
msg_location_device_no_allow
));
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
View file @
610de350
...
...
@@ -30,6 +30,7 @@ import jp.agentec.abook.abv.cl.environment.DeviceInfo;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ABVLoginActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
...
...
@@ -638,11 +639,22 @@ public class LoginActivity extends ABVLoginActivity {
* ユーザ変更時の初期化
*/
private
void
changeUserInit
()
{
//中心温度計の情報維持のため、PreferenceUtil初期化前にデータ取得
String
deviceName
=
getUserPref
(
AppDefType
.
UserPrefKey
.
BLUETOOTH_DEVICE_TEMPERATURE_NAME
,
""
);
String
deviceAddress
=
getUserPref
(
AppDefType
.
UserPrefKey
.
BLUETOOTH_DEVICE_TEMPERATURE_ADDRESS
,
""
);
PreferenceUtil
.
clear
(
this
);
getABVUIDataCache
().
clear
();
PreferenceUtil
.
clearUserPref
(
this
);
memberInfoDao
.
deleteMemberInfo
();
//PreferenceUtil初期化後、中心温度計の情報保存
if
(
deviceAddress
.
length
()
!=
0
)
{
putUserPref
(
AppDefType
.
UserPrefKey
.
BLUETOOTH_DEVICE_TEMPERATURE_NAME
,
deviceName
);
putUserPref
(
AppDefType
.
UserPrefKey
.
BLUETOOTH_DEVICE_TEMPERATURE_ADDRESS
,
deviceAddress
);
}
contentLogic
.
deleteContentMarkingData
();
boolean
isAllDelete
=
true
;
if
(
getRInteger
(
R
.
integer
.
not_delete_all_contents
)
==
1
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
View file @
610de350
...
...
@@ -8,6 +8,7 @@ import android.bluetooth.le.ScanCallback;
import
android.bluetooth.le.ScanResult
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.location.LocationManager
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Handler
;
...
...
@@ -21,6 +22,7 @@ import android.widget.Toast;
import
java.util.ArrayList
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.cl.util.BleManagerUtil
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
...
...
@@ -33,6 +35,7 @@ import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import
jp.agentec.abook.abv.ui.home.adapter.BleListAdapter
;
import
jp.agentec.abook.abv.ui.home.adapter.BleListRowData
;
import
jp.agentec.abook.abv.ui.home.adapter.common.SectionHeaderData
;
import
jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper
;
public
class
PairingSettingActivity
extends
ABVUIActivity
{
private
static
final
String
TAG
=
"PairingSettingActivity"
;
...
...
@@ -172,15 +175,8 @@ public class PairingSettingActivity extends ABVUIActivity {
@Override
protected
void
onResume
()
{
super
.
onResume
();
// デバイスのBluetooth機能の有効化要求
requestBluetoothFeature
();
// ローカルに保存されているディバイスの情報がない場合処理を行う
if
(
getUserPref
(
AppDefType
.
UserPrefKey
.
BLUETOOTH_DEVICE_TEMPERATURE_ADDRESS
,
""
).
length
()
==
0
)
{
// スキャン開始
startScan
();
}
//画面表示時にスキャン実行
startScan
();
}
// 別のアクティビティ(か別のアプリ)に移行したことで、バックグラウンドに追いやられた時
...
...
@@ -209,6 +205,21 @@ public class PairingSettingActivity extends ABVUIActivity {
// スキャンの開始
private
void
startScan
()
{
//BlueTooth許可チェック
if
(!
requestBluetoothFeature
())
return
;
LocationManager
lm
=
(
LocationManager
)
this
.
getSystemService
(
this
.
LOCATION_SERVICE
);
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
//端末側の位置情報許可チェック
if
(!
gpsEnabled
)
{
showSimpleAlertDialog
(
R
.
string
.
set_pairing_central_thermometer
,
R
.
string
.
msg_location_device_no_allow
);
return
;
}
ABookPermissionHelper
helper
=
new
ABookPermissionHelper
(
this
,
Constant
.
ABookPermissionType
.
AccessFineLocation
,
null
);
//アプリ側の位置情報許可チェック(置くだけセンサーとLinkingアプリの通信できないため)
if
(!
helper
.
checkMultiPermissions
(
true
))
return
;
//デバイス接続中にはスキャンさせない
if
(
mConnecting
)
{
return
;
...
...
@@ -370,13 +381,14 @@ public class PairingSettingActivity extends ABVUIActivity {
// デバイスのBluetooth機能の有効化要求
private
void
requestBluetoothFeature
()
{
private
boolean
requestBluetoothFeature
()
{
if
(
bleManagerUtil
.
mBluetoothAdapter
.
isEnabled
())
{
return
;
return
true
;
}
// デバイスのBluetooth機能が有効になっていないときは、有効化要求(ダイアログ表示)
Intent
enableBtIntent
=
new
Intent
(
BluetoothAdapter
.
ACTION_REQUEST_ENABLE
);
startActivityForResult
(
enableBtIntent
,
REQUEST_ENABLEBLUETOOTH
);
return
false
;
}
}
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