about cling,after switching WIFI, Often connected to the device

60 Views Asked by At

about cling,after switching WIFI, Often connected to the device,TV side received the news,but can not find the phone,"Device not found" error

1

There are 1 best solutions below

0
On

1,find androidRouter class,then find onNetworkTypeChange(); can resolve search history repeat.
2,AndroidUpnpServiceConfiguration createNetworkAddressFactory(),return super.createNetworkAddressFactory(65500) //如果网络变化 并且是WiFi情况下 那么重置 if (newNetwork!=null && newNetwork.isConnected() && isWifi()){ // TODO: 2017/7/19 网络变化重置路由地址和localdevice 删除历史记录 CONNECTIVITY_CHANGE这个监听有点慢 可以考虑换network_change_action Log.e("AndroidRouter", "onNetworkTypeChange: 调用" ); disable(); //清理历史记录 List remoteDevices = UpnpServiceManager.getInstance().getRemoteDevices(); for (int i = 0; i