w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Trouble receiving data from Android Bluetooth connection

I found the problem. Rather than straight up calling "toString()" on the array of bytes, I needed to call the String constructor to properly convert the data:

String message = new String(buffer, "UTF-8");

specifying UTF-8 is what made the difference.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.