Examples of startInquiry()


Examples of javax.bluetooth.DiscoveryAgent.startInquiry()

        LocalDevice localDevice = LocalDevice.getLocalDevice();
        Log.write("Your Computers Bluetooth MAC: " + localDevice.getBluetoothAddress());

        Log.write("Starting device inquiry...");
        DiscoveryAgent discoveryAgent = localDevice.getDiscoveryAgent();
        discoveryAgent.startInquiry(DiscoveryAgent.GIAC, deviceDiscovery);


        try {
            synchronized (lock) {
                lock.wait();
View Full Code Here

Examples of javax.bluetooth.DiscoveryAgent.startInquiry()

    public BluetoothClient() throws BluetoothStateException {
        LocalDevice localDev = LocalDevice.getLocalDevice();
        System.out.println("Local Bluetooth Name is " + localDev.getFriendlyName());
        localDev.setDiscoverable(DiscoveryAgent.GIAC);
        DiscoveryAgent discovery = localDev.getDiscoveryAgent();
        discovery.startInquiry(DiscoveryAgent.GIAC, this);
    }

    /** @see javax.bluetooth.DiscoveryListener#deviceDiscovered(javax.bluetooth.RemoteDevice, javax.bluetooth.DeviceClass) */
    public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
        System.out.println("Device Discovered: " + btDevice.bdAddrLong);
View Full Code Here

Examples of javax.bluetooth.DiscoveryAgent.startInquiry()

        //System.out.println("Local Bluetooth Name is "+localDev.getFriendlyName());
        //System.out.println("IAC is "+localDev.getDiscoverable());
        //System.out.println("set Discoverable "+localDev.setDiscoverable(DiscoveryAgent.GIAC));
        //System.out.println("IAC is "+localDev.getDiscoverable());
        DiscoveryAgent discovery = localDev.getDiscoveryAgent();
        System.out.println("Inquiry:" + discovery.startInquiry(DiscoveryAgent.GIAC, this));
    }

    /** @see javax.bluetooth.DiscoveryListener#deviceDiscovered(javax.bluetooth.RemoteDevice, javax.bluetooth.DeviceClass) */
    public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
        System.out.println("Device Discovered" + btDevice.bdAddrLong);
View Full Code Here

Examples of javax.bluetooth.DiscoveryAgent.startInquiry()

    //display local device address and name
    LocalDevice localDevice = LocalDevice.getLocalDevice();
    //find devices
    DiscoveryAgent agent = localDevice.getDiscoveryAgent();

    agent.startInquiry(DiscoveryAgent.GIAC, bluetoothServiceDiscovery);
    try
    {
      synchronized(lock)
      { lock.wait(); }
    }
View Full Code Here

Examples of javax.bluetooth.DiscoveryAgent.startInquiry()

       
        if(runDiscovery) {
          synchronized (inquiryCompletedEvent) {
            try {
              logger.debug("Launching bluetooth device discovery...");
              boolean started = agent.startInquiry(
                  DiscoveryAgent.GIAC, listener);
              if (started) {
                inquiryCompletedEvent.wait();
              }
            } catch (BluetoothStateException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.