答案 0 :(得分:0)
1,找到androidRouter类,然后找到onNetworkTypeChange();可以解决搜索记录重复 2,AndroidUpnpServiceConfiguration createNetworkAddressFactory(),返回super.createNetworkAddressFactory(65500) //如果网络变化并且是WiFi情况下那么重置 if(newNetwork!= null&& newNetwork.isConnected()&& isWifi()){ // TODO:2017/7/19网络变化重置路由地址和localdevice删除历史记录CONNECTIVITY_CHANGE这个监听有点慢可以考虑换network_change_action Log.e(" AndroidRouter"," onNetworkTypeChange:调用"); 禁用(); //清理历史记录 列出remoteDevices = UpnpServiceManager.getInstance()。getRemoteDevices(); for(int i = 0; i