1
votes

Is it possible to dedicate a WiFi network (to a device with no internet access) to a socket in an app and keep Cellular network as the default internet connection for the Android device (and other network requests from the app)? (Android 5 & 6)

I can easily switch between WiFi and Cellular within the app but the main issue is when WiFi is up, Internet is not accessible anymore for the app and all apps already running on the device (i.e. streaming music, web browser, ...)

I have tried to bind the Wifi network to the process or a socket but I can't find any way to do that with getting the network active (and at this point Android just try to route all the internet traffic to the device...).

My understanding is that Android 5 & 6 provides more flexibility to route traffic to multiple networks at the same time but I think I'm missing something here...

1

1 Answers

1
votes

As per the Connecting your App to a Wi-Fi Device blog post:

Alternatively, if you’d like to route some of your app traffic to the Wi-Fi device and some to the Internet over the mobile network: