How to check whether your Android device has Bluetooth support?

By | July 13, 2011

Hello all..

This is a simple example to check whether your android device supports Bluetooth or not.
May be currently all devices may have bluetooth support, but still ………….

package pack.coderzheaven;

import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.os.Bundle;

public class BluetoothExample extends Activity  {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        if (mBluetoothAdapter == null) {
            System.out.println("Device do not support Bluetooth..");
        }
    }
}

One thought on “How to check whether your Android device has Bluetooth support?

  1. Louis Cantu

    Hey I think I should the code of my device because its giving me connectivity problem…. Thanks for the script you have provided.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *