How To Receive Data Via Bluetooth On Android?
I read many topics, but I couldn't find good answer. I'm working on Android application that uses Bluetooth to send and receive data from Microcontroller. I have already finished
Solution 1:
This is basically an callback function and as you can see in the parameter it is giving you 2 things data of type byte[] and message of type String. Now you can just log the 2 and see what values are being given to you like below
Log.d("Data value : " + data.toString() + "Message : " + message);
And then you can do whatever that you intend to do with it like update a view, etc. like below
TextViewmessageView= findViewById(R.id.message);
messageView.setText(message);
Post a Comment for "How To Receive Data Via Bluetooth On Android?"