Android examples for Bluetooth:Turn On bluetooth
Checks if the bluetooth adapter is on and ready.
//package com.java2s; import android.bluetooth.BluetoothAdapter; public class Main { /**//from w ww . ja va 2 s .c o m * Checks if the bluetooth adapter is on and ready. */ public static boolean isBluetoothAvailable() { BluetoothAdapter tempBtAdapter = BluetoothAdapter .getDefaultAdapter(); return tempBtAdapter != null && tempBtAdapter.isEnabled(); } }