Example usage for android.bluetooth BluetoothAdapter STATE_DISCONNECTED

List of usage examples for android.bluetooth BluetoothAdapter STATE_DISCONNECTED

Introduction

In this page you can find the example usage for android.bluetooth BluetoothAdapter STATE_DISCONNECTED.

Prototype

int STATE_DISCONNECTED

To view the source code for android.bluetooth BluetoothAdapter STATE_DISCONNECTED.

Click Source Link

Document

The profile is in disconnected state

Usage

From source file:Main.java

public static String getStateString(int state) {
    switch (state) {
    case BluetoothAdapter.STATE_CONNECTED:
        return "Connected";
    case BluetoothAdapter.STATE_CONNECTING:
        return "Connecting";
    case BluetoothAdapter.STATE_DISCONNECTED:
        return "Disconnected";
    case BluetoothAdapter.STATE_DISCONNECTING:
        return "Disconnecting";
    case BluetoothAdapter.STATE_OFF:
        return "Off";
    case BluetoothAdapter.STATE_ON:
        return "On";
    case BluetoothAdapter.STATE_TURNING_OFF:
        return "Turning Off";
    case BluetoothAdapter.STATE_TURNING_ON:
        return "Turning On";
    default:/*from  w w  w  .  ja  v a 2  s .  com*/
        return "Unknown";
    }
}