网络判断
public static boolean isconn(Context context){
ConnectivityManager service= (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = service.getActiveNetworkInfo();
if(info!=null && info.isConnected()){
return true;
}else{
return false;
}
}