I've written an android application getting data from external sensors using Bluetooth. It's working fine on Sony Ericsson XPERIA but not on a HTC Hero (it finds external devices but it can't get any data from them) I'm wondering why. After some research on the net, I still haven't found any clue. Anyone had similar bluetooth issues on HTC?
If I remember correctly the HTC phones had or [have] an issue at a certain API level (maybe 2.1 and below?). The resolution is reflection.
Reference
Disconnect a bluetooth socket in Android
Service discovery failed exception using Bluetooth on Android
Solution
Instead of using
use
to get your BluetoothSocket on certain HTC phones using a certain API level.
Solution Expanded
I recently had an application where I had to account for this, and I did not like using this on non-HTC phones, so I had a conditional to check for HTC, if true then use reflection, otherwise dont.
isAnHTCDevice():