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
6551ebdd
Commit
6551ebdd
authored
Jun 13, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
テストGPS
parent
24f71b3d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
+3
-19
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
View file @
6551ebdd
...
...
@@ -6,14 +6,12 @@ import android.bluetooth.BluetoothDevice;
import
android.bluetooth.le.BluetoothLeScanner
;
import
android.bluetooth.le.ScanCallback
;
import
android.bluetooth.le.ScanResult
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.location.LocationManager
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.provider.Settings
;
import
android.view.View
;
import
android.widget.AdapterView
;
import
android.widget.Button
;
...
...
@@ -210,26 +208,12 @@ public class PairingSettingActivity extends ABVUIActivity {
//BlueTooth許可チェック
if
(!
requestBluetoothFeature
())
return
;
LocationManager
lm
=
(
LocationManager
)
get
SystemService
(
Context
.
LOCATION_SERVICE
);
LocationManager
lm
=
(
LocationManager
)
get
ApplicationContext
().
getSystemService
(
this
.
LOCATION_SERVICE
);
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
final
boolean
network
=
lm
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
);
Logger
.
i
(
"-------------------lm : "
+
(
lm
!=
null
?
"is not null"
:
"is null"
));
Logger
.
i
(
"-------------------gpsEnabled : "
+
gpsEnabled
);
Logger
.
i
(
"-------------------network : "
+
network
);
String
gpsStatus
=
android
.
provider
.
Settings
.
Secure
.
getString
(
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
);
if
(
gpsStatus
.
indexOf
(
"gps"
,
0
)
<
0
)
{
// Toastを表示
Toast
.
makeText
(
getApplicationContext
(),
"GPSは無効です"
,
Toast
.
LENGTH_LONG
).
show
();
//端末側の位置情報許可チェック
if
(!
gpsEnabled
)
{
showSimpleAlertDialog
(
R
.
string
.
set_pairing_central_thermometer
,
R
.
string
.
msg_location_device_no_allow
);
return
;
}
else
{
// GPSが有効だった場合
// Toastを表示
Toast
.
makeText
(
getApplicationContext
(),
"GPSは有効です"
,
Toast
.
LENGTH_LONG
).
show
();
}
ABookPermissionHelper
helper
=
new
ABookPermissionHelper
(
this
,
Constant
.
ABookPermissionType
.
AccessFineLocation
,
null
);
...
...
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