Package javax.bluetooth

Examples of javax.bluetooth.RemoteDevice


  }

  /** This method is called by the blue tooth control when search has completed */
  public void servicesDiscovered(int transID, ServiceRecord[] servRecord) {

    RemoteDevice rd = null;
    String serviceName = "no service";

    try {

      /** look up this request id and get a remote device */
 
View Full Code Here


    if (results.isEmpty()) {
      System.out.println("no devices found");
      return;
    }

    RemoteDevice target = null;
    Enumeration<RemoteDevice> list = results.elements();
    while (list.hasMoreElements()) {

      target = list.nextElement();
      try {

        System.out.println(target.getBluetoothAddress() + " : "
            + target.getFriendlyName(false));

      } catch (Exception e) {
        constants.error(e.getMessage());
        e.printStackTrace();
      }
View Full Code Here

    Command devs = new Command(ZephyrOpen.discovery);
    devs.add(ZephyrOpen.address, local.getBluetoothAddress());
    devs.add(ZephyrOpen.deviceName, local.getFriendlyName());
   
    RemoteDevice target = null;
    Enumeration<RemoteDevice> list = results.elements();
    while (list.hasMoreElements()) {

      target = list.nextElement();
      try {

        devs.add(target.getFriendlyName(false), target.getBluetoothAddress());

      } catch (Exception e) {
        constants.error(e.getMessage());
      }
    }
View Full Code Here

            // if new device, add to the list
            if (!bluetoothDevices.isEmpty()) {
              Enumeration<RemoteDevice> list = bluetoothDevices.elements();
              while (list.hasMoreElements()) {
                RemoteDevice target = list.nextElement();
                try {
                 
                  addDevice(target.getFriendlyName(false));
                  found.put(target.getFriendlyName(false), target.getBluetoothAddress());
                 
                } catch (Exception e) {
                  constants.error(e.getMessage(), this);
                }
              }
View Full Code Here

  }

  private static boolean kirimPesan(String pesan) throws IOException {
    LCD.drawString("Mencoba menyambung", 0, 1);
    LCD.refresh();
    RemoteDevice partner = Bluetooth.getKnownDevice("NXT");
    if (partner == null) {
      LCD.drawString("partner tidak ketemu", 0, 4);
      LCD.refresh();
      return false;
    }
View Full Code Here

TOP

Related Classes of javax.bluetooth.RemoteDevice

Copyright © 2018 www.massapicom. 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.