-
Notifications
You must be signed in to change notification settings - Fork 0
/
gps.html
65 lines (56 loc) · 2.34 KB
/
gps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline'; img-src * 'self' data:; script-src * 'unsafe-inline' 'unsafe-eval'">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<style type="text/css">
body{
padding: 16px;
margin: 0;
}
body.ios .android,
body.android .ios{
display: none;
}
button[disabled]{
color: #ccc;
}
h2{
text-align: center;
margin-top: 0;
padding-top: 0;
}
button{
margin-bottom: 16px;
}
</style>
</head>
<body>
<h3>cordova-plugin-request-location-accuracy example</h3>
<div class="android">
<p>Location Mode: <span id="location-mode"></span></p>
</div>
<div class="ios">
<p>To run through the test conditions, do the following:</p>
<ol>
<li>Open Settings > Privacy and turn off Location Services</li>
<li>Request Location to trigger the native dialog that allows you to open Location Settings directly</li>
</ol>
<p>Location available: <span id="location-available"></span></p>
<p>Location Services: <span id="location-enabled"></span></p>
</div>
<p>Location authorized: <span id="location-authorized"></span></p>
<div>
<button id="request-authorization" onclick="requestLocationAuthorization()">Request Location Authorization</button>
</div>
<div>
<button id="request-accuracy" onclick="requestLocationAccuracy()">Request Location Accuracy</button>
</div>
<div><button onclick="openSettings()">Open settings</button></div>
</body>
</html>