Code example for WifiP2pDeviceList

Methods: getDeviceList

0
    public void onPeersAvailable(WifiP2pDeviceList peerList) {
        if (progressDialog != null && progressDialog.isShowing()) {
            progressDialog.dismiss();
        } 
        peers.clear();
        peers.addAll(peerList.getDeviceList());        
        ((WiFiPeerListAdapter) getListAdapter()).notifyDataSetChanged();
        if (peers.size() == 0) {
             
            return; 
        } 
 
    } 
 
    public void clearPeers() { 
        peers.clear();
        ((WiFiPeerListAdapter) getListAdapter()).notifyDataSetChanged();
    } 
 
    /** 
     *