Como obtener la MAC del emisor Bluetooth del movil?

David
17 de Octubre del 2005
Pues resulta que quiero poder identificar univocamente a cada emisor bluetooth que use mi aplicacion, y para ello habia pensado en la MAC del emisor Bluetooth. He encontrado este codigo, pero no funciona, devuelve siempre null. Alguien me echa una mano? GRACIAS :)

public String getBluetoothMAC(){

String iden = "";
try {
Class.forName("javax.bluetooth.LocalDevice");
iden = javax.bluetooth.LocalDevice.getLocalDevice().getBluetoothAddress();
if (iden != null)
{
if (iden.trim().equals(""))
System.out.println("no acceso");
}
} catch (Exception e) {System.out.println("Can not retrieve Bluetooth Address");}

return iden;
}