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?
Related
I am connected to two networks, one is wifi without internet and the other is mobile data. My device finds other devices in the local network (wifi), but when it tries to connect, there is a timeout because it is trying to connect to mobile data. How can I force connection to the local network?
Scenario:
(device: Pixel OS: Android 7.1.1, (also Galaxy 7, Android 7.0)
App is connected to a local wifi network that does not have internet access
Pixel phone is connected to LTE cellular data connection
App requests a url like http://192.168.1.1:80/test Pixel phone routes
that request to the LTE cellular data connection, presumably because
it has internet connectivity and my wifi network does not.
I want to force the App to make the http://192.168.1.1:80/test request on the local wifi network even if it does not have external internet capabilities.
I am using Retrofit and Okhttp, and also have tried: org.apache.http.impl.client.AbstractHttpClient
Any ideas?
If 192.168.1.0/24 is a locally connected network, it should be routed automatically. If not, you'll need a routing table entry, e.g. 192.168.1.0/24 -> 192.168.99.1 (if your Wifi is 192.168.99.0/24 and .1 is the router in between).
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'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?
I've written an Android app that includes creating a socket connection between 2 mobiles over wifi. The connection works fine at home with my wireless router and WEP security. However, when I tried to run the app at my local coffee shop, I could not make the socket connection. Both droids were connected to the shop's wireless network and the client was using the correct IP address. However, when I tried to make the connection, I received a SocketTimeoutException. I've tried this app at other (home-type with WEP) locations and as long as both mobiles are connected to the wifi network they can set up the socket connection.
Is there something in the configuration of public wifi networks that doesn't allow socket connections to be set up?
It can be that router in this coffe shop allows only specific ports like 80 for http and other ports are blocked by device, maybe you can try setting up your server on the device on such normally open port.