Reputation: 3399
We are developing an application that connects to an external device using WIFI, but this external device has no internet access.
In Android M we have realized that the System prioritize a connection with internet access, so the device uses Cellular data to connect internet instead of WIFI.
The problem in that behaviour is that we are not able to access the external device due the device is connected via cellular data instead of WIFI.
Is there anyway to prioritize Wifi connection over cellular data?
Thanks in advance.
Upvotes: 0
Views: 3081
Reputation: 2023
I think this is what you are looking for : http://developer.android.com/reference/android/net/ConnectivityManager.html#bindProcessToNetwork(android.net.Network)
And here is similar problem, just the other way around : How to use data connection instead of WIFI when both are enabled?
Upvotes: 1