android判断网络状态
如何用Android studio创建一个能判断网络状态的项目
2回答
-
iMcLaren
ConnectivityManager connectivityManager =
(ConnectivityManager)context.getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
-
远方的云o
hh~可以去问问度娘呀~~