Java Code Examples for

The following examples show how to use These examples are extracted from open source projects. 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   Source File:    License: Apache License 2.0 5 votes vote down vote up
public void setDeviceName(String name){
//		setDeviceName(Channel c, String devName, ActionListener listener)
		Class<WifiP2pManager> clzz = WifiP2pManager.class;
		ActionListener listener=new ActionListener() {
			public void onSuccess() {
				ALog.i(TAG, "setDeviceName succees");
			public void onFailure(int reason) {
				ALog.i(TAG, "setDeviceName failure");
		Method m=null;
		try {
					new Class[]{Channel.class,String.class,ActionListener.class});
			m.invoke(mWifiP2pManager, getChannel(),name,listener);	
		} catch (Exception e) {
		} finally{
Example 2
Source Project: ShareBox   Source File:    License: Apache License 2.0 4 votes vote down vote up
public Channel getChannel() {
	return mWifiChannel;
Example 3
Source Project: Demo_Public   Source File:    License: MIT License 4 votes vote down vote up
public WifiDirectReceiver(WifiP2pManager manager,Channel channel,WiFiDirectActivity activity){
    this.mActivity = activity;
    this.mChannel = channel;
    this.mManager = manager;
Example 4
public void startReceiver(WifiP2pManager mManager, Channel mChannel) {
    Logger.log(TAG, "Starting receiver");
    this.mChannel = mChannel;
    this.mManager = mManager;