无法将BlackBerry手机与Bluetooth SPP设备连接
我正在尝试使用以下代码从blackberry 9900手机连接到蓝牙设备无法将BlackBerry手机与Bluetooth SPP设备连接,blackberry,bluetooth,spp,Blackberry,Bluetooth,Spp,我正在尝试使用以下代码从blackberry 9900手机连接到蓝牙设备 public final class AppMainScreen extends MainScreen { private BluetoothspInfo[] spInfo; private StreamConnection bConn; private DataInputStream diStream; private String text; public AppMainScreen(
public final class AppMainScreen extends MainScreen {
private BluetoothspInfo[] spInfo;
private StreamConnection bConn;
private DataInputStream diStream;
private String text;
public AppMainScreen() {
spInfo = BluetoothSerialPort.getSerialPortInfo();
try {
bConn = (StreamConnection) Connector.open(
spInfo[0].toString(), Connector.READ);
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
UiApplication.getUiApplication().invokeLater(new TextScanner());
}
// ...
// ...
// ...
}
但是它总是抛出异常java.io.IOException:无法连接。
我无法获得完整跟踪。
这里有什么问题,有人能给我指一下正确的方向吗。
我正在使用平台版本为4.5的BlackBerry Java on BlackBerry Eclipse插件