I’m currently developing a game for Android that features bluetooth multiplayer and I am coming across some tricky issues.
Firstly, it appears that some older phones have custom bluetooth implementations that don’t play well with the bluetooth API. I’ve seen this for myself when testing with my HTC Desire (Android 2.2), which can host a bluetooth game but not connect as a client (other non-htc devices can connect without any problems). A common solution involved using java reflection to access non-public methods of the API, but not only is this a messy solution it didn’t solve the problem for me anyway. Has any one else run into this problem or found a solution without rooting the device?
I’ve also noticed that after a while the bluetooth connection becomes unreliable, in order to fix it I either switch bluetooth off and on again, or in some cases, restart the phone. Is it possible I’m ‘gunking up’ the bluetooth adaptor, or is this expected behavior? Either way, is it possible to somehow do a flush/reset without turning things off?