搜索蓝牙设备

时间:2014-05-03 06:53:27

标签: bluetooth

我试图编写一个java程序来搜索附近的蓝牙设备.. 我使用Bluecove-glp-2.1.0和bluecove 2.1.0

我正在研究Ubuntu 13.04 LTS

我输入代码以获取本地设备名称..

package bluetoothsearch;
import javax.bluetooth.*;
public class BluetoothSearch {

    public static void main(String[] args) {
           LocalDevice ld= null ;
           String name = ld.getBluetoothAddress();
           System.out.print(name);

    }   
}

这是我的代码..

它返回null。不会将本地设备返回给我。

如果有人帮忙,那就太棒了。

0 个答案:

没有答案