I'm developing an android app which deals with network connection. If my device is connected to a normal WiFi network then it works properly, but if I connect my device to a WiFi network having proxy settings then my app does not work. Those network calls doesn't work if WiFi has proxy settings.
Is there any solution for detecting whether WiFi network has proxy settings?
Related
Using Delphi (FMX) and Indy10.
I am trying to connect to a Database Server on a WIFI Network, which is in fact Connected, but does not have Internet access.
The Android ConnectionManager claims the WIFI is NOT connected, when a Mobile Network is connected. When this Mobile Network goes in and out connection (bad coverage) the ConnectionManager keeps flipping the WIFI Network as being Connected and Not Connected, while all the time the WIFI is in fact connected (but has no Internet access).
I must make a stable connection to the WIFI network to my Database Server, regardless of the invalid WIFI status ConnectionManager, and including when the Mobile network is in fact connected, as I need the WIFI based Database Server. This means I cannot use the 'Active Network'.
How do I do this?
I have an application that needs to connect to a wifi network, but this wifi network has a captive portal in which you have to make a click in a button to get internet access in that network.
My problem is that in android 5.0 and higher the OS do not connect the wifi network because it first checks if the wifi network has internet access if a mobile network with internet access is present. I want to connect to the wifi network even without internet access because i want to handle the captive portal in my app.
Is there a way to do this? because android detects it is connected to the wifi network but because is has no internet access it still uses the mobile network adapter.
I know that one option is to redirect all the traffic from my app to the wifi adapter but I would rather to not do that. But to just tell android to connect to the wifi network even without internet.
Thanks!
I have a use case where I need to use Wifi network for my requests instead of the mobile network. The mobile device has already connected to the Wifi network. But Android seems to always resolve network requests using the mobile data network instead of the Wifi network. Note that the Wifi network does not have internet access, it is simply a wifi access point exposed by an external device during setup.
I tried using ConnectivityManager's setNetworkPreference(ConnectivityManager.TYPE_WIFI) but that did not work.
Disable mobile data while wifi setup is required.
It won't resolve any requests with a carrier network if this is enabled.
Enable aeroplane mode, then toggle wifi
I've got local wireless network with no internet access, and I use static IP of my router to connect from Android device. When 3G(HSPDA disabled) Android phone see and connect to the router in WiFi network (ssh), however when I turn on 3g, my phone cannot see WiFi router. Is there any workarounds for that without disabling 3G service while using local WiFi in app?
I think you might be suffering from an Android optimization. Try to go to the WiFi settings, hit the menu key and choose "Advanced", and uncheck "Avoid poor connections".
https://android.stackexchange.com/questions/46513/avoided-poor-internet-connection-even-though-signal-strength-speed-is-great
On My Android device i have both Ethernet and Wifi Network connections.
What i wan to implement is I want to check if Wifi and Ethernet both the connections are Active at the same time then I wan to disable the Wifi Network and Keep Ethernet Connection ON.
I am using android WifiManager and BroadcastReceiver android.net.conn.CONNECTIVITY_CHANGE for Checking Wifi state Connected/Disconnected and also to Enabling/Disabling the Wifi Network.
But I am not able to check the Ethernet Connection State and also I am not able to Enable/Disable the Ethernet Connection.
For Checking the Ethernet connection sate I am reading system file '/sys/class/net/eth0' which is returning me Correct Ethernet State. But for Enabling/Disabling Ethernet I am not able to figure it out how to do it.
I have Ethernet Connection Options in the Settings menu provided by the Android from where we can configure Ethernet connection of the device.
In the ConnectivityManager there is an API getActiveNetworkInfo which only returns the currently connection network interface, But I want to retrieve the list of all the Connected Interfaces from where we can connect to internet.
Is there any service running on Android that can give me Access to Enable/Disable Ethernet connection and also API to get the Ethernet connection state?
Thanks.
One Way of archiving it,
Current Ethernet state of Android Device is updated in the file /sys/class/net/eth0/operstate by Android operating system. We need to read this file for getting the state.
File will contain string UP if Ethernet is up else string DOWN if Ethernet is down.
I tried this way and it is working for me.
But not sure if it will work on all the devices with all the Android versions.