本文介绍了在UnknownHostException异常的android:无线上网问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在从服务器解析JSON数据得到的UnknownHostException,

我的网址上工作:

真实设备浏览器(资料图只)

有时它在PC浏览器的工作和有时没有。

其实我有得到了WiFi问题,有时它的WiFi连接工作,当其不,我已经重新启动我的wifi和它的工作,并经过一段时间后同样的问题来了,

我要得到这个wifi连接问题的长期解决办法,重新启动WiFi是从来没有在应用程序用户端的解决方案,

什么是确切的问题和解决方案也...


解决方案

  WifiManager wifiManager =(WifiManager)getSystemService(Context.WIFI_SERVICE);
                        INT LINKSPEED = wifiManager.getConnectionInfo()getRssi()。                            的System.out.println(链接速度是==+ LINKSPEED);

这将要给你的WiFi速度,只提到一个速度如果速度来那么只有做下一步的工作。

I have get UnknownhostException in parsing JSON data from server,

My URL working on :

http://jsonlint.com

on real device browser(data plan only)

Sometimes its working on PC browser and sometimes not.

Actually I have get the wifi issue, Sometimes its working on wifi connection, when its not, I have restarted my wifi and its worked, and after some time the same issue came,

I want to get the permanent solution for this wifi connection issue, Restarting the Wifi is never a solution on the application user side,

What is the exact problem and solution also...

解决方案
WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE);
                        int linkSpeed = wifiManager.getConnectionInfo().getRssi();

                            System.out.println("Link Speed is======"+linkSpeed);

It will give u wifi speed so just mention one speed if that speed come then only do next work

这篇关于在UnknownHostException异常的android:无线上网问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 15:18