开发者

Android Bluetooth issue when reading from inputsream in HTC Desire Z

I am doing a project dealing with transmitting image files from BTM-182 Bluetooth module to Android phone. The program is based on Android 2.0.

I have read the Bluetooth Chat program from google, and I can establish the connection using standard Bluetooth SPP profile UUID. I can obtain the inputstream and outputstream from BluetoothSocket in the program.

The problem happens in my HTC Desire Z (Android 2.2, not rooted) when reading from inputstream. I need to read 38400 byte of data each time, but the program seems that it can only read about 24000 byte and 开发者_Python百科hangs, no more bytes can be read and no exceptions are thrown!

However, the same program runs fine on another phone with unmodified Android 2.2 system which is rooted.

I have already googled that it seems that the Bluetooth SPP profile in HTC Desire is broken and has a buggy implementation: http://code.google.com/p/android/issues/detail?id=8382 I don't know whether my Desire Z suffers the same buggy implementation.

Any suggestions of this problem?


How about trying out the Amarino API. www.amarino-toolkit.net/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜