Java 类android.net.wifi.p2p.WifiP2pManager.Channel 实例源码

项目:android_opengles    文件:NFGame.java   
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();
        }
    }
}
项目:aperi    文件:AperiBroadcastReceiver.java   
/**
 * @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;
    }
}
项目:TK_1701    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:aos-FileCoreLibrary    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:buildAPKsSamples    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:buildAPKsSamples    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:Nucleus    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:Practice    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:android-qr-data-transfer    文件:WiFiDirectBroadcastReceiver.java   
/** Constructor */
public WiFiDirectBroadcastReceiver(WifiP2pManager manager,
                                   Channel channel,
                                   TransferActivity activity) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.activity = activity;
}
项目:AndroidSideLoading    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:Blaubot    文件:BlaubotWifiP2PAdapter.java   
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);
}
项目:Blaubot    文件:BlaubotWifiP2PBeacon.java   
/**
 * 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);
}
项目:expo-connect    文件:WiFiDirectBroadcastReceiver.java   
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);
}
项目:expo-connect    文件:WiFiDirectBroadcastReceiver.java   
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);
}
项目:android_opengles    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:android_opengles    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:syncarnet    文件:SynCarnetBroadcastReceiver.java   
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;
}
项目:syncarnet    文件:PeerList.java   
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;
}
项目:servicediscoverypg    文件:DevicesActivity.java   
private void setupWifiDirect() {

        WifiP2pManager manager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
        Channel channel = manager.initialize(this, getMainLooper(), null);

        wifi = new WifiDirectManager(manager, channel, this, this);

        wifi.addLocalService(ChatActivity.getInstanceName(), ChatActivity.getRegistrationType(), 
                ChatActivity.getRecords());
        wifi.addLocalService("LaserWriter 8500", "_printer._tcp", null);
    }
项目:collision-avoidance-warning    文件:WifiBroadcastReceiver.java   
/**
 * Constructor
 *
 * @param WifiP2pManager manager
 * @param WifiP2pManager.Channel channel
 */
public WifiBroadcastReceiver(WifiP2pManager manager, Channel channel)
{
    super();
    this.wifiP2pManager = manager;
    this.wifiP2pChannel = channel;
}
项目:wifi_p2p    文件:WiFiDirectBroadcastReceiver.java   
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        MainActivity activity) {
    super();
    this.mManager = manager;
    this.mChannel = channel;
    this.mActivity = activity;
}
项目:ShareVideo    文件:WiFiDirectBroadcastReceiver.java   
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        FetchingFragment fetcher) {
    super();
    this.manager = manager;
    this.channel = channel;
    this.fetcher = fetcher;
}
项目:higgs-bot    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:higgs-bot    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:DynamixBridge    文件:WifiDirectBroadcastReceiver.java   
public WifiDirectBroadcastReceiver(WifiP2pManager mManager, Channel mChannel, WifiDirectService wifiDirectService)
{
    super();
       this.mManager = mManager;
       this.mChannel = mChannel;
       this.wifiDirectService = wifiDirectService;
}
项目:WifiDirectDiscovery    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @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;
}
项目:wifi_p2p    文件:WiFiDirectBroadcastReceiver.java   
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
        MainActivity activity) {
    super();
    this.mManager = manager;
    this.mChannel = channel;
    this.mActivity = activity;
}
项目:dissertation-project    文件:WiFiDirectBroadcastReceiver.java   
/**
 * @param manager WifiP2pManager system service
 * @param channel Wifi p2p channel
 * @param activity activity associated with the receiver
 */
public WiFiDirectBroadcastReceiver(final WifiP2pManager manager, final Channel channel, final Service service) {
    super();
    mP2pManager = manager;
    mChannel = channel;
    mService = service;
}
项目:Demo_Public    文件:WifiDirectReceiver.java   
public WifiDirectReceiver(WifiP2pManager manager,Channel channel,WiFiDirectActivity activity){
    super();
    this.mActivity = activity;
    this.mChannel = channel;
    this.mManager = manager;
}
项目:Audio-based-probing-of-the-environment    文件:WiFiBroadcastReceiver.java   
public WiFiBroadcastReceiver(WifiP2pManager manager, Channel channel,   WifiClient service) {
    super();        this.manager = manager;        this.channel = channel;        this.service1 = service;
}
项目:Audio-based-probing-of-the-environment    文件:WiFiBroadcastReceiver.java   
public WiFiBroadcastReceiver(WifiP2pManager manager, Channel channel,   WifiServer service) {
    super();        this.manager = manager;        this.channel = channel;        this.service2 = service;
}
项目:SDC    文件:WirelessBroadcastReceiver.java   
public WirelessBroadcastReceiver(WifiP2pManager wifiManager, Channel channel, Context context) {
    this.wifiP2PManager = wifiManager;
    this.mChannel = channel;
    this.context = context;
}
项目:swan-sense-studio    文件:WDBroadcastReceiver.java   
public WDBroadcastReceiver(WifiP2pManager manager, Channel channel, WDManager wdManager) {
    this.p2pManager = manager;
    this.p2pChannel = channel;
    this.wdManager = wdManager;
}
项目:Blaubot    文件:BlaubotWifiP2PAdapter.java   
protected Channel getAcceptorWifiChannel() {
    return acceptorWifiChannel;
}
项目:commcare-android    文件:WiFiDirectManagementFragment.java   
public void startReceiver(WifiP2pManager mManager, Channel mChannel) {
    Logger.log(TAG, "Starting receiver");
    this.mChannel = mChannel;
    this.mManager = mManager;
}
项目:syncarnet    文件:PeerSelection.java   
public PeerSelection(WifiP2pManager manager, Channel channel, SynCarnet synCarnet) {
    this.manager = manager;
    this.channel = channel;
    this.synCarnet = synCarnet;
    this.progressDialog = this.synCarnet.syncService.getProgressDialog();
}
项目:syncarnet    文件:SyncService.java   
public SyncService(SynCarnet synCarnet, WifiP2pManager manager, Channel channel, BluetoothAdapter mBluetoothAdapter) {
    this.synCarnet = synCarnet;
    this.manager = manager;
    this.channel = channel;
    this.mBluetoothAdapter = mBluetoothAdapter;
}
项目:servicediscoverypg    文件:WifiDirectManager.java   
/**
 * Adds the Actions for the WifiP2pManager to IntentFilter and stores Manager and Channel
 * @param manager
 * @param channel
 * @param responseListener
 * @param connListener
 */
public WifiDirectManager(WifiP2pManager manager, Channel channel,
        final DnsSdResponseListener responseListener, ConnectionInfoListener connListener){

    intentFilter = new IntentFilter();

    intentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);

    this.manager = manager;
    this.channel = channel;

    this.connectionInfoListener = connListener;

    setupDnsSdResponseListeners(responseListener);
    setupDnsSdServiceRequest();
}
项目:Blaubot    文件:BlaubotWifiP2PBroadcastReceiver.java   
/**
 * The needed {@link WifiP2pManager} and {@link Channel} can be retrieved like this:
 *    mManager = (WifiP2pManager) context.getSystemService(Context.WIFI_P2P_SERVICE);
 *    mChannel = mManager.initialize(context, context.getMainLooper(), null);
 * 
 * @param manager the {@link WifiP2pManager} manager instace
 * @param channel the channel
 */
public BlaubotWifiP2PBroadcastReceiver(WifiP2pManager manager, Channel channel) {
    super();
    this.mManager = manager;
    this.mChannel = channel;
    this.eventListeners = new CopyOnWriteArrayList<BlaubotWifiP2PBroadcastReceiver.IBlaubotWifiDirectEventListener>();
}
项目:klammer    文件:Wifi.java   
/**
 * get wifi direct framework channel
 * @return channel object
 */
public Channel getChannel() {
    return channel;
}