-
Notifications
You must be signed in to change notification settings - Fork 41
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
Brainstorming: Detecting network state #348
Comments
related: #324 |
We can try out the QNetworkInterface class https://doc.qt.io/qt-5/qnetworkinterface.html with the QNetwork module. Qt 6.1 has QNetworkInformation https://doc.qt.io/qt-6/qnetworkinformation.html. I think we should avoid trying to implement platform specific network tests ourselves. |
Hi! We have some limitations for QProcess in some platforms such as Android and iOS. |
We don't need Qt API or terminal commands, we can use platform specific api's that don't ping any server to know if the device has internet access |
Closing as brainstorming is not needed, and we can move discussion into #324 and subsequent designs on the no internet access state |
We need to have the ability to detect network state to allow for states such as the following (specified in the design file):
We have two options to go down through, at least with platforms aside from android.
1. Enable the Qt Network API
This gives us access to the QNetworkConfigurationManager class. Here we have access to the following signals and functions that give us the information we need:
It should be noted that with these functions, Qt checks that the computer is connected to any signal, and not if that signal really has an internet connection.
2. Use system specific terminal commands in a Process
For example, on macOS, this could be something like the following:
There should be available commands for macOS, linux, and Windows; but this approach won't work for Android, where we'll just plug into some android api for this information.
The text was updated successfully, but these errors were encountered: