Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-覆盖动态IP的DNS_Android_Networking - Fatal编程技术网

Android-覆盖动态IP的DNS

Android-覆盖动态IP的DNS,android,networking,Android,Networking,我想在Android上使用我自己的DNS。IP是静态的还是通过DHCP获取的。所以我把 Settings.System.putString(getContentResolver(), Settings.System.WIFI_STATIC_DNS1, mIP); 但我认为它只适用于静态IP 如何覆盖每个案例的DNS设置 提前感谢,, Mike另一种解决方案可能是让您的应用程序使用以下方式自行执行DNS查找: DHCP设置指示客户端要使用的DNS服务器。

我想在Android上使用我自己的DNS。IP是静态的还是通过DHCP获取的。所以我把

Settings.System.putString(getContentResolver(), Settings.System.WIFI_STATIC_DNS1, mIP);
但我认为它只适用于静态IP

如何覆盖每个案例的DNS设置

提前感谢,,
Mike

另一种解决方案可能是让您的应用程序使用以下方式自行执行DNS查找:


DHCP设置指示客户端要使用的DNS服务器。