Example usage for android.bluetooth BluetoothDevice DEVICE_TYPE_DUAL

List of usage examples for android.bluetooth BluetoothDevice DEVICE_TYPE_DUAL

Introduction

In this page you can find the example usage for android.bluetooth BluetoothDevice DEVICE_TYPE_DUAL.

Prototype

int DEVICE_TYPE_DUAL

To view the source code for android.bluetooth BluetoothDevice DEVICE_TYPE_DUAL.

Click Source Link

Document

Bluetooth device type, Dual Mode - BR/EDR/LE

Usage

From source file:Main.java

public static String getDeviceType(int type) {
    switch (type) {
    case BluetoothDevice.DEVICE_TYPE_CLASSIC:
        return "CLASSIC";
    case BluetoothDevice.DEVICE_TYPE_DUAL:
        return "DUAL";
    case BluetoothDevice.DEVICE_TYPE_LE:
        return "LE";
    default://from w  ww . j  a  va 2 s  .co m
        return "Unknown";
    }
}

From source file:Main.java

public static String formatDeviceType(int type) {
    switch (type) {
    case BluetoothDevice.DEVICE_TYPE_CLASSIC:
        return "Bluetooth Classic";
    case BluetoothDevice.DEVICE_TYPE_LE:
        return "Low Energy";
    case BluetoothDevice.DEVICE_TYPE_DUAL:
        return "Dual";
    case BluetoothDevice.DEVICE_TYPE_UNKNOWN:
    default://from  w  w  w.  ja  v  a2  s.  co  m
        return "Unknown";
    }
}