Android Bluetooth Status
<p>I want to make a simple android application that detects if Bluetooth is enabled or not.</p>

<p>I have already made an app to detect if WiFi is on or not using the code shown below.
What I want to know is, how can i use a similar code for Bluetooth.</p>

<p>Code Used for WiFi:</p>

<pre><code>ConnectivityManager mycm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);

    boolean wifi = mycm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnectedOrConnecting();


    TextView tv1 = (TextView) findViewById(R.id.textview1);


    if (wifi){
        tv1.setText("Wifi is connected");
    }

    else{
        tv1.setText("Wifi is not connected");
    }
</code></pre>
