Closed eku closed 9 months ago
the app needs to ping the internet. So you need to fix it your proxy
@woheller69 ICMP echo request/reply is not allowed behind a proxy, only HTTP(S) connection. That's the idea of a proxy.
Please do not test the connection status in the app yourself, but use the information from Android.
Which information?
That stuff is not reliable
That stuff is not reliable
Why not. Just connect to the weather server when Android sends connected callback. If failed, try when app get's callback again. And so on.
As we can see, the ICMP test is even less reliable.
Feel free to implement and test accross a wide range of devices. Then open a PR
Feel free to implement and test accross a wide range of devices. Then open a PR
I will replace your app with a different one.
As far as I understand the code at https://github.com/woheller69/omweather/blob/master/app/src/main/java/org/woheller69/weather/services/UpdateDataService.java#L130 it does a DNS lookup for api.open-meteo.com
. As the result may already be cached on the device, this is not a reliable test for an existing Internet connection.
The question still remains as to why omWeather
does not use the proxy configured in the WLAN profile. This could be due to the com.android.volley
library.
See
Once the cause has been clarified, it should be easy for you to correct the error.
You can simply remove the check and compile your own version. The currently implemented solution has been working for years over a wide range of devices and Android versions. Now there is one user where it is not working. I will not spend time in investigating this and I will not risk a degradation for other users.
Describe the bug Using the app behind a proxy results in an error "Das Gerät ist nicht mit dem Internet verbunden". The main gateway logs direct access of the app to the internet.
How to Reproduce Steps to reproduce the behavior:
Expected behavior The app uses the configure WLAN proxy.
Screenshots N/A
Environment (please complete the following information):
I can provide a network sniffer log, if needed.