change_wifi_state, và INTERNET quyền:
Các kết nối Wi-Fi Direct được khởi xướng và quản lý sử dụng các dịch vụ hệ thống wifiP2pManager, mà bạn có thể truy cập bằng cách sử dụng phương pháp getSystemService, đi qua trong hằng Context.WIFI_P2P_ DỊCH VỤ:
wifiP2pManager =
(WifiP2pManager) getSystemService (Context.WIFI_P2P_SERVICE);
Trước khi bạn có thể sử dụng WiFi P2P Manager, bạn phải tạo ra một kênh để các khuôn khổ Direct Wi-Fi sử dụng phương thức khởi Wifi P2P Manager. Vượt qua trong bối cảnh hiện nay, Looper trên đó để nhận Wi-Fi Direct sự kiện, và một ChannelListener để lắng nghe cho mất kết nối kênh của bạn, như thể hiện trong Liệt kê 16-18.
đang được dịch, vui lòng đợi..