From acc568d021d5640ac60b3e6654b2f2f433ff3d32 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Fri, 20 Sep 2024 12:35:23 +0000 Subject: [PATCH 1/2] =?UTF-8?q?iOS=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AE=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index faae236..8ce15ed 100644 --- a/app.json +++ b/app.json @@ -28,6 +28,12 @@ { "initialOrientation": "DEFAULT" } + ], + [ + "expo-location", + { + "locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。" + } ] ], "version": "5.0", @@ -44,8 +50,8 @@ }, "assetBundlePatterns": ["**/*"], "ios": { - "buildNumber": "34", - "supportsTablet": true, + "buildNumber": "38", + "supportsTablet": false, "bundleIdentifier": "jrshikokuinfo.xprocess.hrkn", "config": { "googleMapsApiKey": "AIzaSyAVGDTjBkR_0wkQiNkoo5WDLhqXCjrjk8Y" From 7851567f4a89fa48e80a240d9659ecf8167c5c2c Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Fri, 20 Sep 2024 15:14:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E6=A8=A9=E9=99=90=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/menu.js b/menu.js index 066a74b..eefde48 100644 --- a/menu.js +++ b/menu.js @@ -41,12 +41,16 @@ export default function Menu({ getCurrentTrain }) { const [locationStatus, setLocationStatus] = useState(null); useEffect(() => { Location.requestForegroundPermissionsAsync().then((data) => { - setLocationStatus(data.status); + setLocationStatus( + Platform.OS == "ios" + ? data.status == "granted" + : data.android.accuracy == "fine" + ); }); }, []); const getCurrentPosition = () => { - if (locationStatus !== "granted") return () => {}; + if (!locationStatus) return () => {}; Location.getCurrentPositionAsync({}).then((location) => makeCurrentStation(location) );