¡@

Home 

2014/10/16 ¤W¤È 08:19:52

android Programming Glossary: mylabel.settext

Android + Arduino Bluetooth Data Transfer

http://stackoverflow.com/questions/10327506/android-arduino-bluetooth-data-transfer

catch IOException ex void findBT mBluetoothAdapter BluetoothAdapter.getDefaultAdapter if mBluetoothAdapter null myLabel.setText No bluetooth adapter available if mBluetoothAdapter.isEnabled Intent enableBluetooth new Intent BluetoothAdapter.ACTION_REQUEST_ENABLE.. 0 for BluetoothDevice device pairedDevices if device.getName .equals FireFly 108B mmDevice device break myLabel.setText Bluetooth Device Found void openBT throws IOException UUID uuid UUID.fromString 00001101 0000 1000 8000 00805f9b34fb Standard.. uuid mmSocket.connect mmOutputStream mmSocket.getOutputStream mmInputStream mmSocket.getInputStream beginListenForData myLabel.setText Bluetooth Opened void beginListenForData final Handler handler new Handler final byte delimiter 10 This is the ASCII code..