I am working on a App and I need to talk to my router.
I need to download a file from the router with his local ip
. If the router has no internet access, Android tries to download the file via mobile network
.
Is there a way to force Android to use WiFi
even when there is no internet access?
(its a new feature of Android Marshmallow
to show WiFi but using mobile network).
The file is not accessible from WAN
only from LAN
.
I can force it, when I disable mobile network or turn on airplane mode with WiFi enabled, but this isn't an option. I need to force it programmatically for this specific download.