摘要:
在Android平台上开发基于网络的应用,必然需要去判断当前的网络连接情况。下面的代码,作为例子,详细说明了对于当前网络情况的判断。 先看一个自己定义的应用类。public class NetworkDetector {public static boolean detect(Activity act) {ConnectivityManager manager = (ConnectivityManager) act .getApplicationContext().getSystemService( Context.CONNECTIVITY_SERVICE);if (manager == nu 阅读全文
posted @ 2013-08-29 18:42
唯美。
阅读(349)
评论(0)
推荐(0)
浙公网安备 33010602011771号