is Bluetooth On - Android Bluetooth

Android examples for Bluetooth:Turn On bluetooth

Description

is Bluetooth On

Demo Code


//package com.java2s;
import android.bluetooth.BluetoothAdapter;

public class Main {
    public static boolean isBluetoothOn() {
        BluetoothAdapter bluetoothAdapter = BluetoothAdapter
                .getDefaultAdapter();/*from   w w w  .j a v a 2  s  . c  o  m*/
        return bluetoothAdapter != null && bluetoothAdapter.isEnabled();
    }
}

Related Tutorials