Merge commit '9b91c4a50e1df914f66c6c5b33007caf4b0c9c32' into develop
This commit is contained in:
commit
540225d04d
10
app.json
10
app.json
@ -28,6 +28,12 @@
|
|||||||
{
|
{
|
||||||
"initialOrientation": "DEFAULT"
|
"initialOrientation": "DEFAULT"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"expo-location",
|
||||||
|
{
|
||||||
|
"locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"version": "5.0",
|
"version": "5.0",
|
||||||
@ -44,8 +50,8 @@
|
|||||||
},
|
},
|
||||||
"assetBundlePatterns": ["**/*"],
|
"assetBundlePatterns": ["**/*"],
|
||||||
"ios": {
|
"ios": {
|
||||||
"buildNumber": "34",
|
"buildNumber": "38",
|
||||||
"supportsTablet": true,
|
"supportsTablet": false,
|
||||||
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
|
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
|
||||||
"config": {
|
"config": {
|
||||||
"googleMapsApiKey": "AIzaSyAVGDTjBkR_0wkQiNkoo5WDLhqXCjrjk8Y"
|
"googleMapsApiKey": "AIzaSyAVGDTjBkR_0wkQiNkoo5WDLhqXCjrjk8Y"
|
||||||
|
8
menu.js
8
menu.js
@ -41,12 +41,16 @@ export default function Menu({ getCurrentTrain }) {
|
|||||||
const [locationStatus, setLocationStatus] = useState(null);
|
const [locationStatus, setLocationStatus] = useState(null);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Location.requestForegroundPermissionsAsync().then((data) => {
|
Location.requestForegroundPermissionsAsync().then((data) => {
|
||||||
setLocationStatus(data.status);
|
setLocationStatus(
|
||||||
|
Platform.OS == "ios"
|
||||||
|
? data.status == "granted"
|
||||||
|
: data.android.accuracy == "fine"
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getCurrentPosition = () => {
|
const getCurrentPosition = () => {
|
||||||
if (locationStatus !== "granted") return () => {};
|
if (!locationStatus) return () => {};
|
||||||
Location.getCurrentPositionAsync({}).then((location) =>
|
Location.getCurrentPositionAsync({}).then((location) =>
|
||||||
makeCurrentStation(location)
|
makeCurrentStation(location)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user