Wednesday, November 9, 2011

Way to get Bluetooth Address in Android Phone

For getting bluetooth address first we need to enable bluetooth. The code snippet for getting bluetooth address is,

BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
String btMacAddress = btAdapter.getAddress();

The permission that we need to put in Manifest file is,

<uses-permsission android:name="android.permission.BLUETOOTH" />

No comments:

Post a Comment