Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.bluetooth.BluetoothDevice;

public class Main {
    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:
            return "Unknown";
        }
    }
}