how to send sensed data in onSensorChanged method over bluetooth in android?

view full story

http://stackoverflow.com – Please help me i am stuck in between my dream project. Here I am sensing the data in onSensorChanged method & trying to send the data to PC over bluetooth. But i am unable to make that work.Here are public void onSensorChanged(SensorEvent event) { // TODO Auto-generated method stub float flt = event.values[1]; buf = (int)flt; String msg1 = Integer.toString(buf); myLabel.setText(msg1); sendData(); } void sendData() throws IOException { Log.v(TAG, "in send data..."); String msg = Integer.toString(buf); msg += "\n"; mmOutputStream.write(msg.getBytes()) (HowTos)