Java tutorial
//package com.java2s; //License from project: Open Source License import android.bluetooth.BluetoothProfile; public class Main { public static String getBleConnectStatus(int status) { switch (status) { case BluetoothProfile.STATE_DISCONNECTED: return "STATE_DISCONNECTED"; case BluetoothProfile.STATE_CONNECTING: return "STATE_CONNECTING"; case BluetoothProfile.STATE_CONNECTED: return "STATE_CONNECTED"; case BluetoothProfile.STATE_DISCONNECTING: return "STATE_DISCONNECTING"; default: return "STATE_UNKNOWN: " + status; } } }