Code example for WifiP2pDeviceList

Methods: getDeviceList

0
     * (android.net.wifi.p2p.WifiP2pDeviceList) 
     */ 
    @Override 
    public void onPeersAvailable(WifiP2pDeviceList peers) {
        mList.clear();
        mList.addAll(peers.getDeviceList());
 
        if (mAdapter == null) {
            mAdapter = new Adapter();
            setListAdapter(mAdapter);
        } else { 
            mAdapter.notifyDataSetChanged();
        } 
    } 
 
    private class Adapter extends BaseAdapter {
 
        @Override 
        public int getCount() { 
            return mList.size();
        }