Friday, April 29, 2016

Problem of BluetoothChat example

Last year (June 26, 2015) I have a post to show how to "Import Android code sample of BluetoothChat to Android Studio". It work perfectly AT THAT TIME. But I re-try it again on update Android Studio 2.1, and test on ASUS Zenfont 2 running Android 5.0 and XiaoMi RedMi 2 running Android 4.4.4; it almost NOT WORK - no problem in pairing and connecting, but fail to send/receive data: sometimes one-way chat, sometimes totally cannot chat!!!

Then I change the Project Structure to target sdk version Android 4.4 (KitKat), it can be improved, but not 100%.

I have no idea is it related to new Android Studio/SDK? or related to new Android version? or related to individual device(s)?


Rohan Tilekar said...

Where can i get link for this working project of android bluetooth application. My devices have 4.4.2 .Hope it should not be problem

Luc Chouinard said...

Got the same problem here, sometime it work but never in both direction.
Then I close app, rediscover BT, restart app, and it work the other direction