当前位置: 首页>>代码示例>>Java>>正文


Java Channel类代码示例

本文整理汇总了Java中android.net.wifi.p2p.WifiP2pManager.Channel的典型用法代码示例。如果您正苦于以下问题:Java Channel类的具体用法?Java Channel怎么用?Java Channel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Channel类属于android.net.wifi.p2p.WifiP2pManager包,在下文中一共展示了Channel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deinit

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public void deinit() {
	mContext.unregisterReceiver(mNFGameBroadcastReceiver);

	mWifiP2pManager.clearLocalServices(mChannel, new NFGameActionListener("clearLocalServices"));
	mWifiP2pManager.clearServiceRequests(mChannel, new NFGameActionListener("clearServiceRequests"));

	stopPeerDiscovery();

	mWifiP2pManager.cancelConnect(mChannel, new NFGameActionListener("cancelConnect"));
	mWifiP2pManager.removeGroup(mChannel, new NFGameActionListener("removeGroup"));
	if (mNetId != -1) {
		try {
			Method deletePersistentGroup = mWifiP2pManager.getClass().getMethod("deletePersistentGroup",
					Channel.class, int.class, ActionListener.class);
			deletePersistentGroup.setAccessible(true);
			deletePersistentGroup.invoke(mWifiP2pManager, mChannel, mNetId,
					new NFGameActionListener("deletePersistentGroup"));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:zzhouj,项目名称:android_opengles,代码行数:23,代码来源:NFGame.java

示例2: AperiBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager
 *            WifiP2pManager system service
 * @param channel
 *            WifiP2pChannel being listened on
 * @param activity
 *            Activity associated with the receiver
 */
public AperiBroadcastReceiver(WifiP2pManager manager, Channel channel,
        AperiMainActivity activity)
{
    super();
    if (manager == null) {
        throw new IllegalArgumentException("manager is null");
    } else if (channel == null) {
        throw new IllegalArgumentException("channel is null");
    } else if (activity == null) {
        throw new IllegalArgumentException("activity is null");
    } else {
        mManager = manager;
        mChannel = channel;
        mActivity = activity;
    }
}
 
开发者ID:hv15,项目名称:aperi,代码行数:25,代码来源:AperiBroadcastReceiver.java

示例3: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param wfd wfd associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
                                   WiFiDirect wfd) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.wfd = wfd;
    connector = wfd.connector;
    communicator = wfd.communicator;
}
 
开发者ID:jphacks,项目名称:TK_1701,代码行数:15,代码来源:WiFiDirectBroadcastReceiver.java

示例4: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        WiFiDirectBroadcastListener listener) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.listener = listener;
}
 
开发者ID:archos-sa,项目名称:aos-FileCoreLibrary,代码行数:13,代码来源:WiFiDirectBroadcastReceiver.java

示例5: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        WiFiDirectActivity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:13,代码来源:WiFiDirectBroadcastReceiver.java

示例6: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        Activity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:13,代码来源:WiFiDirectBroadcastReceiver.java

示例7: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager  WifiP2pManager system service
 * @param channel  Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
                                   WiFiDirectActivity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
 
开发者ID:TheAndroidApp,项目名称:Nucleus,代码行数:13,代码来源:WiFiDirectBroadcastReceiver.java

示例8: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
                                   WiFiDirectActivity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
 
开发者ID:lucky-code,项目名称:Practice,代码行数:13,代码来源:WiFiDirectBroadcastReceiver.java

示例9: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/** Constructor */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager,
                                   Channel channel,
                                   TransferActivity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
 
开发者ID:prgpascal,项目名称:android-qr-data-transfer,代码行数:10,代码来源:WiFiDirectBroadcastReceiver.java

示例10: BlaubotWifiP2PAdapter

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public BlaubotWifiP2PAdapter(BlaubotUUIDSet uuidSet, WifiP2pManager manager, WifiManager wifiManager, Channel acceptorChannel) {
	this.uuidSet = uuidSet;
	this.wifiP2pManager = manager;
	this.wifiManager = wifiManager;
	this.acceptorWifiChannel = acceptorChannel;
	this.knownDevices = new HashSet<>();
	this.blaubotWifiP2PBroadcastReceiver = new BlaubotWifiP2PBroadcastReceiver(manager, acceptorChannel);
       this.acceptor = new BlaubotWifiP2PAcceptor(this);
	this.connector = new BlaubotWifiP2PConnector(this);
	this.connectionStateMachineConfig = new ConnectionStateMachineConfig();
	this.adapterConfig = new BlaubotAdapterConfig();
	ConnectionStateMachineConfig.validateTimeouts(connectionStateMachineConfig, adapterConfig);
}
 
开发者ID:Blaubot,项目名称:Blaubot,代码行数:14,代码来源:BlaubotWifiP2PAdapter.java

示例11: BlaubotWifiP2PBeacon

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
/**
 * The string that we exploit to pre-filter upnp devices before we probe them if they are really a
 * blaubot beacon.
 * @param wifiP2pManager android's wifi p2p manager service 
 * @param beaconChannel the wifi p2p channel to be used for this beacon
 * @param beaconPort the tcp port for this beacon to listen on
 */

public BlaubotWifiP2PBeacon(WifiP2pManager wifiP2pManager, Channel beaconChannel, int beaconPort) {
    this.beaconPort = beaconPort;
    this.knownActiveDevices = Collections.newSetFromMap(new ConcurrentHashMap<BlaubotWifiP2PDevice, Boolean>());
    this.wifiP2pManager = wifiP2pManager;
    this.wifiP2pBeaconChannel = beaconChannel;
    this.wifiP2pBroadcastReceiver = new BlaubotWifiP2PBroadcastReceiver(wifiP2pManager, beaconChannel);
    this.wifiP2pBroadcastReceiver.addEventListener(wifiDirectEventListener);
    this.bonjourListener = new BonjourListener();
    this.upnpListener = new UPNPListener();
    this.wifiP2pManager.setDnsSdResponseListeners(beaconChannel, bonjourListener, bonjourListener);
    this.wifiP2pManager.setUpnpServiceResponseListener(wifiP2pBeaconChannel, upnpListener);
}
 
开发者ID:Blaubot,项目名称:Blaubot,代码行数:21,代码来源:BlaubotWifiP2PBeacon.java

示例12: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, WifiP2pManager.Channel channel, ConnectService service) {
	super();
	this.manager = manager;
	this.channel = channel;
	this.service = service;
	this.infoListener = new InfoActionListener("Discovery Initiated", "Discovery Failed", service);
	this.peersUpdater = new PeersListUpdater(service);
	this.connInfo = new ConnectionInfo(service);
}
 
开发者ID:andrebask,项目名称:expo-connect,代码行数:10,代码来源:WiFiDirectBroadcastReceiver.java

示例13: WiFiDirectBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, WifiP2pManager.Channel channel, StartActivity activity) {
	super();
	this.manager = manager;
	this.channel = channel;
	this.activity = activity;
	this.infoListener = new InfoActionListener("Discovery Initiated", "Discovery Failed", activity);
	this.peersUpdater = new PeersListUpdater(activity);
	this.connInfo = new ConnectionInfo(activity);
}
 
开发者ID:andrebask,项目名称:expo-connect,代码行数:10,代码来源:WiFiDirectBroadcastReceiver.java

示例14: SynCarnetBroadcastReceiver

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public SynCarnetBroadcastReceiver(WifiP2pManager manager, Channel channel, SynCarnet synCarnet, Boolean displayPeers) {
	super();
	this.manager = manager;
	this.channel = channel;
	this.synCarnet = synCarnet;
	this.peerList = new PeerList(synCarnet, manager, channel, displayPeers);
	this.displayPeers = displayPeers;
}
 
开发者ID:npmiller,项目名称:syncarnet,代码行数:9,代码来源:SynCarnetBroadcastReceiver.java

示例15: PeerList

import android.net.wifi.p2p.WifiP2pManager.Channel; //导入依赖的package包/类
public PeerList(SynCarnet synCarnet, WifiP2pManager manager, Channel channel, Boolean display) {
	this.peerList = new ArrayList<WifiP2pDevice>();
	this.synCarnet = synCarnet;
	this.manager = manager;
	this.channel = channel;
	this.intent = intent;
	this.peerSelection = new PeerSelection(manager, channel, synCarnet);
	this.peerListDialog = new PeerListDialog(peerList, peerSelection);
	this.display = display;
}
 
开发者ID:npmiller,项目名称:syncarnet,代码行数:11,代码来源:PeerList.java


注:本文中的android.net.wifi.p2p.WifiP2pManager.Channel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。