├── res
├── drawable
│ ├── machine.png
│ ├── section_header.xml
│ └── details_view.xml
├── drawable-hdpi
│ ├── icon.png
│ ├── ic_launcher.png
│ ├── ic_action_on_off.png
│ └── ic_action_discover.png
├── drawable-ldpi
│ ├── icon.png
│ ├── ic_launcher.png
│ ├── ic_action_on_off.png
│ └── ic_action_discover.png
├── drawable-mdpi
│ ├── icon.png
│ ├── ic_launcher.png
│ ├── ic_action_on_off.png
│ └── ic_action_discover.png
├── drawable-xhdpi
│ ├── ic_launcher.png
│ ├── ic_action_on_off.png
│ └── ic_action_discover.png
├── values
│ ├── colors.xml
│ ├── dimens.xml
│ └── strings.xml
├── menu
│ └── action_items.xml
├── layout-large
│ └── main.xml
├── layout-land
│ └── main.xml
└── layout
│ ├── main.xml
│ ├── row_devices.xml
│ ├── device_list.xml
│ └── device_detail.xml
├── src
└── com
│ └── example
│ └── android
│ └── wifidirect
│ ├── Utility.java
│ ├── AppNetService.java
│ ├── WrapAsyncTask.java
│ ├── WrapRunable.java
│ ├── ThreadPoolManager.java
│ ├── WiFiDirectActivity.java
│ ├── DeviceDetailFragment.java
│ ├── WiFiDirectBroadcastReceiver.java
│ ├── ConfigInfo.java
│ └── DeviceListFragment.java
├── assets
└── sample_file.txt
├── README.md
├── .gitignore
├── .classpath
├── project.properties
├── .project
└── AndroidManifest.xml
/res/drawable/machine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable/machine.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_action_on_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-hdpi/ic_action_on_off.png
--------------------------------------------------------------------------------
/res/drawable-ldpi/ic_action_on_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-ldpi/ic_action_on_off.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_action_on_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-mdpi/ic_action_on_off.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_action_discover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-hdpi/ic_action_discover.png
--------------------------------------------------------------------------------
/res/drawable-ldpi/ic_action_discover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-ldpi/ic_action_discover.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_action_discover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-mdpi/ic_action_discover.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_action_on_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-xhdpi/ic_action_on_off.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_action_discover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/res/drawable-xhdpi/ic_action_discover.png
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/Utility.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/Utility.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/AppNetService.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/AppNetService.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/WrapAsyncTask.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/WrapAsyncTask.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/WrapRunable.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/WrapRunable.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/ThreadPoolManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/ThreadPoolManager.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/WiFiDirectActivity.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/WiFiDirectActivity.java
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/DeviceDetailFragment.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/DeviceDetailFragment.java
--------------------------------------------------------------------------------
/assets/sample_file.txt:
--------------------------------------------------------------------------------
1 | This is a sample text file for wifi_direct demo.
2 |
3 | Once the devices are connected, the server i.e. groupOwner will listen for incoming connections and write this file.
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/WiFiDirectBroadcastReceiver.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huangjunkun/WiFiDirectDemo/HEAD/src/com/example/android/wifidirect/WiFiDirectBroadcastReceiver.java
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | WiFiDirectDemo
2 | ==============
3 |
4 |
5 | A android application about Wifi-Direct P2P Share your picture.
6 | Thanks.
7 |
8 | Author - Junkun Huang.
9 | Email - huangjunkun@gmail.com
10 |
--------------------------------------------------------------------------------
/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF000000
4 | #FF111111
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
--------------------------------------------------------------------------------
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/res/drawable/section_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
14 |
16 |
17 |
--------------------------------------------------------------------------------
/res/drawable/details_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/res/menu/action_items.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-14
15 |
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | 300dp
19 | 200dp
20 |
21 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.example.android.wifidirect.WiFiDirectActivity1
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/res/layout-large/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | WiFi Direct
4 | P2P On/Off
5 | Discover
6 | Connect
7 | Disconnect
8 | Send File
9 |
10 | yes
11 | no
12 | This device will act as a client. Click on Gallery button to pick a local(stored) file
13 | No devices found. Turn on P2P and perform discovery from the Action Bar
14 | Enable P2P from action bar button above or system settings
15 | "Am I the Group Owner? "
16 | ME
17 | PEERS
18 | Report IP
19 |
20 |
--------------------------------------------------------------------------------
/res/layout-land/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
17 |
18 |
19 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/res/layout/row_devices.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
19 |
25 |
32 |
33 |
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/ConfigInfo.java:
--------------------------------------------------------------------------------
1 | package com.example.android.wifidirect;
2 |
3 |
4 |
5 | class ConfigInfo {
6 |
7 | public static final int MSG_NULL = 20;
8 | public static final int MSG_RECV_PEER_INFO = 21;
9 | public static final int MSG_REPORT_SEND_PEER_INFO_RESULT = 22;
10 | public static final int MSG_SEND_RECV_FILE_BYTES = 23;
11 | public static final int MSG_VERIFY_RECV_FILE_DIALOG = 24;
12 | public static final int MSG_REPORT_RECV_FILE_RESULT = 25;
13 | public static final int MSG_REPORT_SEND_FILE_RESULT = 26;
14 | public static final int MSG_SERVICE_POOL_START = 27;
15 | public static final int MSG_SEND_STRING = 28;
16 | public static final int MSG_REPORT_RECV_PEER_LIST = 29;
17 | public static final int MSG_REPORT_SEND_STREAM_RESULT = 30;
18 | public static final int MSG_UPDATE_LOCAL_INFO = 31;
19 |
20 |
21 | public static final int REQUEST_CODE_SELECT_IMAGE = 50;
22 | public static final int REQUEST_CODE_SELECT_VIDEO = 51;
23 | public static final int REQUEST_CODE_SELECT_AUDIO = 52;
24 | public static final int REQUEST_CODE_SELECT_AUDIO_ARM = 53;
25 | public static final int REQUEST_CODE_SELECT_TAKE_VIDEO = 54;
26 | public static final int REQUEST_CODE_SELECT_TAKE_IMAGE = 55;
27 |
28 | public static final int COMMAND_ID_SEND_PEER_INFO = 100;
29 | public static final int COMMAND_ID_SEND_FILE = 101;
30 | public static final int COMMAND_ID_REQUEST_SEND_FILE = 102;
31 | public static final int COMMAND_ID_RESPONSE_SEND_FILE = 103;
32 | public static final int COMMAND_ID_BROADCAST_PEER_LIST = 104;
33 | public static final int COMMAND_ID_SEND_STRING = 105;
34 |
35 | public static final int LISTEN_PORT = 8988;
36 | public static final int SOCKET_TIMEOUT = 5000;
37 |
38 | }
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
22 |
25 |
26 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/res/layout/device_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
19 |
20 |
21 |
27 |
33 |
38 |
44 |
51 |
52 |
53 |
54 |
59 |
60 |
65 |
66 |
67 |
73 |
74 |
80 |
81 |
--------------------------------------------------------------------------------
/res/layout/device_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
19 |
24 |
29 |
35 |
36 |
42 |
43 |
44 |
48 |
52 |
56 |
60 |
61 |
69 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/com/example/android/wifidirect/DeviceListFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.wifidirect;
18 |
19 | import android.app.ListFragment;
20 | import android.app.ProgressDialog;
21 | import android.content.Context;
22 | import android.content.DialogInterface;
23 | import android.net.wifi.p2p.WifiP2pConfig;
24 | import android.net.wifi.p2p.WifiP2pDevice;
25 | import android.net.wifi.p2p.WifiP2pDeviceList;
26 | import android.net.wifi.p2p.WifiP2pManager.PeerListListener;
27 | import android.os.Bundle;
28 | import android.util.Log;
29 | import android.view.LayoutInflater;
30 | import android.view.View;
31 | import android.view.ViewGroup;
32 | import android.widget.ArrayAdapter;
33 | import android.widget.ListView;
34 | import android.widget.TextView;
35 |
36 | import java.util.ArrayList;
37 | import java.util.List;
38 |
39 | /**
40 | * A ListFragment that displays available peers on discovery and requests the
41 | * parent activity to handle user interaction events
42 | */
43 | public class DeviceListFragment extends ListFragment implements PeerListListener {
44 |
45 | private List peers = new ArrayList();
46 | ProgressDialog progressDialog = null;
47 | View mContentView = null;
48 | private WifiP2pDevice device;
49 |
50 | // private WiFiDirectActivity getWiFiDirectActivity() {
51 | // return (WiFiDirectActivity) this.getActivity();
52 | // }
53 |
54 | @Override
55 | public void onActivityCreated(Bundle savedInstanceState) {
56 | super.onActivityCreated(savedInstanceState);
57 | this.setListAdapter(new WiFiPeerListAdapter(getActivity(), R.layout.row_devices, peers));
58 |
59 | }
60 |
61 | @Override
62 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
63 | mContentView = inflater.inflate(R.layout.device_list, null);
64 | return mContentView;
65 | }
66 |
67 | /**
68 | * @return this device
69 | */
70 | public WifiP2pDevice getDevice() {
71 | return device;
72 | }
73 |
74 | private static String getDeviceStatus(int deviceStatus) {
75 | Log.d(WiFiDirectActivity.TAG, "Peer status :" + deviceStatus);
76 | switch (deviceStatus) {
77 | case WifiP2pDevice.AVAILABLE://3
78 | return "Available";
79 | case WifiP2pDevice.INVITED://1
80 | return "Invited";
81 | case WifiP2pDevice.CONNECTED://0
82 | return "Connected";
83 | case WifiP2pDevice.FAILED://2
84 | return "Failed";
85 | case WifiP2pDevice.UNAVAILABLE:
86 | return "Unavailable";
87 | default:
88 | return "Unknown";
89 | }
90 | }
91 |
92 | /**
93 | * Initiate a connection with the peer.
94 | */
95 | @Override
96 | public void onListItemClick(ListView l, View v, int position, long id) {
97 | WifiP2pDevice device = (WifiP2pDevice) getListAdapter().getItem(position);
98 | ((DeviceActionListener) getActivity()).showDetails(device);
99 | }
100 |
101 | /**
102 | * Array adapter for ListFragment that maintains WifiP2pDevice list.
103 | */
104 | private class WiFiPeerListAdapter extends ArrayAdapter {
105 |
106 | private List items;
107 |
108 | /**
109 | * @param context
110 | * @param textViewResourceId
111 | * @param objects
112 | */
113 | public WiFiPeerListAdapter(Context context, int textViewResourceId,
114 | List objects) {
115 | super(context, textViewResourceId, objects);
116 | items = objects;
117 |
118 | }
119 |
120 | @Override
121 | public View getView(int position, View convertView, ViewGroup parent) {
122 | View v = convertView;
123 | if (v == null) {
124 | LayoutInflater vi = (LayoutInflater) getActivity().getSystemService(
125 | Context.LAYOUT_INFLATER_SERVICE);
126 | v = vi.inflate(R.layout.row_devices, null);
127 | }
128 | WifiP2pDevice device = items.get(position);
129 | if (device != null) {
130 | TextView top = (TextView) v.findViewById(R.id.device_name);
131 | TextView bottom = (TextView) v.findViewById(R.id.device_details);
132 | if (top != null) {
133 | String strTop = device.deviceName;
134 | if (device.deviceName.contains("Android_3f82"))
135 | strTop = ("SamSung");
136 | else if (device.deviceName.contains("Android_c023"))
137 | strTop = ("htc");
138 | else if (device.deviceName.contains("Android_e8bf"))
139 | strTop = ("HTC");
140 | else if (device.deviceName.contains("Android_1bf5"))
141 | strTop = ("HUAWEI");
142 | else if (device.deviceName.contains("Android_a38e"))
143 | strTop = ("HTC-W");
144 | else if (device.deviceName.contains("Android_bc2d"))
145 | strTop = ("HTC-ONE");
146 |
147 | top.setText(strTop);
148 | }
149 | if (bottom != null) {
150 | bottom.setText(getDeviceStatus(device.status));
151 | }
152 | }
153 | return v;
154 |
155 | }
156 | }
157 |
158 | /**
159 | * Update UI for this device.
160 | *
161 | * @param device WifiP2pDevice object
162 | */
163 | public void updateThisDevice(WifiP2pDevice device) {
164 | this.device = device;
165 | TextView view = (TextView) mContentView.findViewById(R.id.my_name);
166 | if (device.deviceName.contains("Android_3f82"))
167 | view.setText("SamSung");
168 | else if (device.deviceName.contains("Android_c023"))
169 | view.setText("htc");
170 | else if (device.deviceName.contains("Android_e8bf"))
171 | view.setText("HTC");
172 | else if (device.deviceName.contains("Android_1bf5"))
173 | view.setText("HUAWEI");
174 | else if (device.deviceName.contains("Android_a38e"))
175 | view.setText("HTC-W");
176 | else if (device.deviceName.contains("Android_bc2d"))
177 | view.setText("HTC-ONE");
178 | else
179 | view.setText(device.deviceName);
180 |
181 | view = (TextView) mContentView.findViewById(R.id.my_status);
182 | view.setText(getDeviceStatus(device.status));
183 | }
184 |
185 | @Override
186 | public void onPeersAvailable(WifiP2pDeviceList peerList) {
187 | if (progressDialog != null && progressDialog.isShowing()) {
188 | progressDialog.dismiss();
189 | }
190 | peers.clear();
191 | peers.addAll(peerList.getDeviceList());
192 | ((WiFiPeerListAdapter) getListAdapter()).notifyDataSetChanged();
193 | if (peers.size() == 0) {
194 | Log.d(this.getClass().getName(), "No devices found");
195 | return;
196 | }
197 |
198 | }
199 |
200 | public void clearPeers() {
201 | peers.clear();
202 | ((WiFiPeerListAdapter) getListAdapter()).notifyDataSetChanged();
203 | }
204 |
205 | /**
206 | *
207 | */
208 | public void onInitiateDiscovery() {
209 | if (progressDialog != null && progressDialog.isShowing()) {
210 | progressDialog.dismiss();
211 | }
212 | progressDialog = ProgressDialog.show(getActivity(), "Press back to cancel", "finding peers", true,
213 | true, new DialogInterface.OnCancelListener() {
214 |
215 | @Override
216 | public void onCancel(DialogInterface dialog) {
217 | Log.d(this.getClass().getName(), "onCancel discovery cancel.");
218 | }
219 | });
220 | }
221 |
222 | /**
223 | * An interface-callback for the activity to listen to fragment interaction
224 | * events.
225 | */
226 | public interface DeviceActionListener {
227 |
228 | void showDetails(WifiP2pDevice device);
229 |
230 | void cancelDisconnect();
231 |
232 | void connect(WifiP2pConfig config);
233 |
234 | void disconnect();
235 | }
236 |
237 | }
238 |
--------------------------------------------------------------------------------