WIFI P2P发现列表没有刷新? [英] WIFI P2P discovery list is not getting refreshed?

查看:74
本文介绍了WIFI P2P发现列表没有刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,其中我在列表中列出了附近的所有WIFI P2P设备.但是问题在于它正在向该设备显示哪些wifi现在已禁用.它能够检测新设备并可以在列表视图中列出,但不能删除旧设备. 预先感谢.

I am working on an application where i listed all the WIFI P2P nearby devices in a list. But the problem is that it is showing that device also which wifi is disable now. It is able to detect new devices and can list in listview but not able to remove the old ones. Thanks in advance.

推荐答案

在WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION匹配操作调用requestpeers()方法内的BrodcastReceiver中,不要在其他任何匹配项内调用.....也使用peers.clear()[可能是您的适配器数组列表].在调用requestpeers()之前.

In the BrodcastReceiver inside WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION matching action call requestpeers() method and dont call inside anyother match.....also use peers.clear() [that may be ur arraylist of adapter]. before calling requestpeers().

这篇关于WIFI P2P发现列表没有刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆