-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let user know if airplane mode is on #315
Comments
…k it out Gab and se eif it works for you? I checked and I dont think you are capable of turning airplane on or off in the app anymore.
I put some code in to check. Seems to work on my end. |
Nice addition, I'll try to test that out. I did have the same thing implemented in the first version, but then with some windows updates, it started to pop the airplane mode message for no reasons. So I removed it to make things more simple. #167 |
@jameljoseph so, it does work but only when the app is opened while airplane mode is on. If airplane mode is toggled on while the app is running, we can still take a station or navigate to the map page without much trouble. Last time it was implemented I did set the warning to pop right in the method that tracks the event regarding the location. Here's where the code used to be: 9022805#diff-f4dbb8457dc93ffa105061b852d7d6513adb0eebc96775af014f533e9592159cR326 So when user tried to get a location and no data was hit, the code assumed it was on airplane mode or something like that. I like the way you'Re getting to it with the connection method instead. It's probably more stable that way. We just need to move your code to the old place I think. And here is the code to get the pop-up yellow like all the other warning messages in the app. You need to set the style of the dialog before opening it:
|
Yeah it is just meant as a warning when they open the app to let them know. I will check the style and change it to all the other pop ups. |
Yeah it's just a warning, but shouldn't we have it auto-detect more often then not? We did have a geologist that fat fingered airplane mode while on an outcrop and had to call via satellite to get some help before we found what was the problem. |
I can set it up so that it detects it every second. I was working with code that would detect it every second but figured it might cause issues because it would be constantly checking and might use up some extra resources |
Yeah, you're right on that, every second is overkill. Just when user takes a station at least, there could be a quick check? That would also take less resource then adding your code to the location event that tracks the GPS changes, that also might too much. |
Ok so I am looking at MapPageViewModel and see there is a task to validate the geolocation access where there is lots of methods like PoorLocationRoutineTap , NoLocationRoutine..... being called depending on certain criteria like accuracy is poor, location is turned off... Do you want me to just move my code inside the NoLocationRoutine method? |
I see inside NoLocationRoutine method you have: public async Task NoLocationRoutine()
|
Oh I just see nolocationflightmode() in the page you sent me |
Yeah that's what I was talking about. We used to pop the warning from this method, but the check wasn't s good as yours so I had to remove it. Either we get your code in the nolocationflightmode or when user takes a station. As long as we don't check it too often or only once. |
I see you commented out a call to run NoLocationFlightMode on line 361 so just below I put a call in to run CheckAirplaneMode:
I put the method just above the NoLocationFlightMode method you created around line 1536. I would check it now but im watching the awards and I don't want to toggle airplane mode on and off. Is this what you meant? I built it and there were no errors and ran it with airplane mode off and it worked fine. |
Awesome, we'll test it out at this place a bit later. That might be good enough. |
Just did a quick test on a tablet, and the app crashes as soon as I put airplane mode while having the app opened. Afterward, when I want to take a station and the tablet is on airplane mode it also crashes the app. |
Oh boy it never crashed on me!! I will work on it more |
So if by chance the user has airplane mode on, we should let them know with a popup box
The text was updated successfully, but these errors were encountered: