Java tutorial
//package com.java2s; //License from project: Open Source License import android.bluetooth.BluetoothDevice; public class Main { 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: return "Unknown"; } } }