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.." ); } } } |
Hey I think I should the code of my device because its giving me connectivity problem…. Thanks for the script you have provided.