HTC Wildfire から Bluetooth デバイスに接続しようとしています。数か月前は正常に動作し、Bluetooth デバイスと接続できましたが、HTC のソフトウェアを更新した後、うまく動作しません。
魅力のように機能するコードに従って電話が更新されなかったとき
bluetoothSocket = bluetoothDevice.createRfcommSocketToServiceRecord(UUID_STRING);
携帯電話を更新した後、調査したところ、次のコードが見つかりました
Method m = bluetoothDevice.getClass().getMethod("createRfcommSocket", new Class[]{int.class});
bluetoothSocket = (BluetoothSocket) m.invoke(bluetoothDevice, Integer.valueOf(1));
bluetoothSocket.connect();
しかし、Bluetooth接続がブロックされ bluetoothSocket.connect()
ます。bluetoothSocket.getInputStream()
さらに、コードはandに到達しません
bluetoothSocket.getOutputStream()
。
誰でもこの問題を解決できますか?
私のHTCワイルドファイアの現在のステータスは
- アンドロイド OS 2.2.1
- ビルド番号 2.25.720.4CL299259 リリース キー