A Alex_197 Well-Known Member Licensed User Longtime User Jul 20, 2022 #1 Hi all I'm running a small (3 activties) test app on my iPhone 7 with iOS ver. 15.5 without SIM Card. The app created for a testing iLocation. I'm running my test in Release mode. If the Wi-Fi works I can successfully get Lat/Long. In Show sub I intialize LocManager On pg_Disapear event I stop GPS by using LocManager.Stop and LocManager.StopHeading On the next screen I initialaize it again. So I run my app allow GPS permission. Click on GPS button on the 1st screen - GPS works Ok. Then I return to the phone sttings screen which in turn stops the GPS and turn off the Wi-FI. I return to the app and click on another button that opens 2nd screen. With Wi-Fi turned off I click on GPS button and get nothing. LocationChanged event and HeadingGhanged event are not raised. But if I click again - it works Attachments GPSTest.zip GPSTest.zip 69.6 KB · Views: 460
Hi all I'm running a small (3 activties) test app on my iPhone 7 with iOS ver. 15.5 without SIM Card. The app created for a testing iLocation. I'm running my test in Release mode. If the Wi-Fi works I can successfully get Lat/Long. In Show sub I intialize LocManager On pg_Disapear event I stop GPS by using LocManager.Stop and LocManager.StopHeading On the next screen I initialaize it again. So I run my app allow GPS permission. Click on GPS button on the 1st screen - GPS works Ok. Then I return to the phone sttings screen which in turn stops the GPS and turn off the Wi-FI. I return to the app and click on another button that opens 2nd screen. With Wi-Fi turned off I click on GPS button and get nothing. LocationChanged event and HeadingGhanged event are not raised. But if I click again - it works
Erel B4X founder Staff member Licensed User Longtime User Jul 20, 2022 #2 Using the old and cumbersome ThreePages example is a complete waste of time. Switch to B4XPages. Why stop and start the location based on the visible page. Let it run. Upvote 0
Using the old and cumbersome ThreePages example is a complete waste of time. Switch to B4XPages. Why stop and start the location based on the visible page. Let it run.
A Alex_197 Well-Known Member Licensed User Longtime User Jul 20, 2022 #3 I mean if the user in the some location without Wi-Fi and at this location there is no cell phone coverage? A lot of places like this in NYC Upvote 0
I mean if the user in the some location without Wi-Fi and at this location there is no cell phone coverage? A lot of places like this in NYC
Erel B4X founder Staff member Licensed User Longtime User Jul 21, 2022 #4 Why do you turn off GPS? How do you want to find the location if there is no wifi nor GPS? Upvote 0
A Alex_197 Well-Known Member Licensed User Longtime User Jul 21, 2022 #5 Erel said: Why do you turn off GPS? How do you want to find the location if there is no wifi nor GPS? Click to expand... to preserve the battery if I don't need to use GPS. My app is for clock in / clock out. Between clock in time and clock out time I don't need to use GPS. It might be 6-8 hours difference. So I stopped it right after clocked in. But I didn't expect the situation that when I start it again before clock out if there is no wi-fi or cell phone service it won't work. I expected that the GPS will get coordinates from the satellite if there are no wi-fi or 4G. Turns out that event LocationChanged event is not fired. Upvote 0
Erel said: Why do you turn off GPS? How do you want to find the location if there is no wifi nor GPS? Click to expand... to preserve the battery if I don't need to use GPS. My app is for clock in / clock out. Between clock in time and clock out time I don't need to use GPS. It might be 6-8 hours difference. So I stopped it right after clocked in. But I didn't expect the situation that when I start it again before clock out if there is no wi-fi or cell phone service it won't work. I expected that the GPS will get coordinates from the satellite if there are no wi-fi or 4G. Turns out that event LocationChanged event is not fired.