Get bluetooth MAC address - Android Bluetooth

Android examples for Bluetooth:Bluetooth Address

Description

Get bluetooth MAC address

Demo Code


//package com.java2s;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;

public class Main {

    private static String bluetoothMAC(Context context) {
        String bluetoothMACStr = "";
        BluetoothAdapter bluetoothAdapter = BluetoothAdapter
                .getDefaultAdapter();//from   w w w  . j  a v  a 2 s .c om
        bluetoothMACStr = bluetoothAdapter.getAddress();
        return bluetoothMACStr;
    }
}

Related Tutorials