is Bluetooth Supported - Android android.bluetooth

Android examples for android.bluetooth:Bluetooth

Description

is Bluetooth Supported

Demo Code

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Main{

    public static boolean isBluetoothSupported() {
        BluetoothAdapter mBluetoothAdapter = BluetoothAdapter
                .getDefaultAdapter();/*from   w w w . j  a  v a  2  s  .c  o m*/
        if (mBluetoothAdapter == null) {
            // Device does not support Bluetooth
            return false;
        } else {
            return true;
        }
    }

}

Related Tutorials