Do not turn off offline mode in some Wi-Fi Networks
Type:
- [ ] New feature
- [X] Improve or extend an existing feature
- [ ] Other:
Explanation
Give ability to set Wi-Fis, in which offline mode will be turned off. In other Wi-Fis offline mode will be turned on Or allow to turn on offline mode in limited Wi-Fi networks.
Reasoning
Every day my phone gets connected to some Wi-Fi networks, but I can connect to my server only from my home network. I have set other Wi-Fi as limited, but offline mode still turns off, so I get connection errors.
Implementation Notes
Maybe something like list of allowed networks? And then check, if WiFi SSID = SSID from list, so turn the offline mode off.
So for #1162 we found a solution that avoids reading the WiFi network - since that requires the "exact location" permission, which is not something that we want to request.
That means we won't be able to toggle offline mode based on the current WiFi name.
But maybe we could add the ability to enable offline mode if the server can't be reached via the local URL (i.e. if there is no remote URL). @flloschy do you think that would be possible to add?
I can imagine that this could result in a few unwanted triggers? Maybe a toggle "local only" or auto detect if the primary address is local might be better solutions?
OK I have an idea what we can do here if "prefer local address" is off and the public/primary address is a local address (no https and starting with 198...) we do the following
Network update received -> local address reachable -> offline mode off else on
But when this "variant" of autoOffline mode is in use the current implementation needs to be skipped/disabled/paused
Alternativly another toggle button? But do we really need more buttons and settings? Haha
But I'll wait for the refactoring so I can maybe split autoOffline logic into more files, the single file is soooo unreadable even for me
This has now been resolved as part of beta version 0.9.18!
@Chaphasilor is it?
Maybe I misread the issue. This is about auto-offline based on server connectivity?
If so we could integrate this with the local/remote address settings, where you can choose if the initial address that was configured during login is a local or remote URL, and if it's a local one, if there is a remote address or if offline mode should be used instead.
Then we can handle the logic all in one place?
that be my idea: https://github.com/jmshrv/finamp/issues/1180#issuecomment-2974089170
@GooDoG337 ive added a new Auto Offline Option called "Unreachable". When a network change is detected it tries to ping the server and based on that OfflineMode is enabled/disabled
Would you consider this to be sufficient to achieve what you suggested?
@GooDoG337 ive added a new Auto Offline Option called "Unreachable". When a network change is detected it tries to ping the server and based on that OfflineMode is enabled/disabled
Would you consider this to be sufficient to achieve what you suggested?
Sorry for late response. Yes, thanks for implementing this feature
@Chaphasilor one step closer to sub 200 issues!