Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 摩托罗拉Droid x的蓝牙问题_Java_Android_Bluetooth - Fatal编程技术网

Java 摩托罗拉Droid x的蓝牙问题

Java 摩托罗拉Droid x的蓝牙问题,java,android,bluetooth,Java,Android,Bluetooth,我需要为我正在开发的应用程序提供一些帮助 简言之,在我的应用程序中,我将通过蓝牙连接到一台设备(由客户的工程团队开发),以从该设备获取数据 我使用了以下蓝牙连接代码 BluetoothDevice btDevice = _btAdapter.getRemoteDevice(address); m = btDevice.getClass().getMethod("createRfcommSocket", new Class[]{int.class}); sock = (

我需要为我正在开发的应用程序提供一些帮助

简言之,在我的应用程序中,我将通过蓝牙连接到一台设备(由客户的工程团队开发),以从该设备获取数据

我使用了以下蓝牙连接代码

BluetoothDevice btDevice = _btAdapter.getRemoteDevice(address);
m = btDevice.getClass().getMethod("createRfcommSocket", new Class[]{int.class});              
sock = (BluetoothSocket)m.invoke(btDevice, Integer.valueOf(1));                           
sock.connect();

// m is a Method and sock is BluetoothSocket object.
此代码适用于除Motoral Droid x以外的所有设备

它正在引发一个异常:

java.io.ioexception:权限被拒绝

我尝试了所有的论坛,但我找不到解决办法

如果有人能解决这个问题,请帮助我


提前感谢

@mu太短了-你知道吗?@c12:我不知道任何安卓的东西,我只是重新标记它以帮助安卓人找到它。@mu太短了-你知道吗?@c12:我不知道任何安卓的东西,我只是重新标记它以帮助安卓人找到它。