android.net.wifi.p2p.WifiP2pManager.Channel Java Examples
The following examples show how to use
android.net.wifi.p2p.WifiP2pManager.Channel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: ShareBox Author: Kerr1Gan File: WifiDirectManager.java License: Apache License 2.0 | 5 votes |
public void setDeviceName(String name){ // setDeviceName(Channel c, String devName, ActionListener listener) Class<WifiP2pManager> clzz = WifiP2pManager.class; ActionListener listener=new ActionListener() { @Override public void onSuccess() { ALog.i(TAG, "setDeviceName succees"); } @Override public void onFailure(int reason) { ALog.i(TAG, "setDeviceName failure"); } }; Method m=null; try { m=clzz.getDeclaredMethod("setDeviceName", new Class[]{Channel.class,String.class,ActionListener.class}); m.setAccessible(true); m.invoke(mWifiP2pManager, getChannel(),name,listener); } catch (Exception e) { e.printStackTrace(); } finally{ if(m!=null) m.setAccessible(false); } }
Example #2
Source Project: ShareBox Author: Kerr1Gan File: WifiDirectManager.java License: Apache License 2.0 | 4 votes |
public Channel getChannel() { return mWifiChannel; }
Example #3
Source Project: Demo_Public Author: coderminer File: WifiDirectReceiver.java License: MIT License | 4 votes |
public WifiDirectReceiver(WifiP2pManager manager,Channel channel,WiFiDirectActivity activity){ super(); this.mActivity = activity; this.mChannel = channel; this.mManager = manager; }
Example #4
Source Project: commcare-android Author: dimagi File: WiFiDirectManagementFragment.java License: Apache License 2.0 | 4 votes |
public void startReceiver(WifiP2pManager mManager, Channel mChannel) { Logger.log(TAG, "Starting receiver"); this.mChannel = mChannel; this.mManager = mManager; }