Force Android to Use Wifi network with no internet

前端 未结 5 913
猫巷女王i
猫巷女王i 2020-12-24 06:23

I am building an android app that needs to communicate over a WiFi network that will not have any internet access. The problem is that even when the WiFi is connected androi

5条回答
  •  情书的邮戳
    2020-12-24 06:49

    you'd need to disable mobile data in the Settings (not certain, if this can be done programmatically, which might be a possible option) - or take out the USIM;

    else the common behavior is, that it will always fall back to the best available connection (while a connection with internet gateway might be preferred, because it is used by most application).

    also see this answer.

提交回复
热议问题