LMBluetoothSdk
LMBluetoothSdk copied to clipboard
Message duplication
Hello!
I faced with some issue. I'm trying to send a number of messages through BT using this lib. My code looks like
for (Banner bannerItem : banners) {
JSONObject bannerJson = new JSONObject();
bannerJson.put("image",bannerItem.getImageUrl());
bannerJson.put("position", bannerItem.getPosition());
ALog.error("Do Send %s", bannerJson.toString());
bluetoothController.write(bannerJson.toString().getBytes());
}
Sometimes receiver app receives current item and previous one, e.g. first message: {banner ob 1} second message: {banner ob 1}{banner obj 2}