【實例簡介】
通過修改官方的demo實現對藍牙的讀寫操作,詳細http://blog.csdn.net/chenfengdejuanlian/article/details/45787123
【實例截圖】
【核心代碼】
BluetoothLe_demo0
└── BluetoothLe_demo0
├── AndroidManifest.xml
├── bin
│?? ├── AndroidManifest.xml
│?? ├── BluetoothLe_demo.apk
│?? ├── classes
│?? │?? └── com
│?? │?? └── example
│?? │?? └── bluetooth
│?? │?? └── le
│?? │?? ├── BluetoothLeService$1.class
│?? │?? ├── BluetoothLeService$LocalBinder.class
│?? │?? ├── BluetoothLeService.class
│?? │?? ├── BuildConfig.class
│?? │?? ├── DeviceControlActivity$1.class
│?? │?? ├── DeviceControlActivity$2.class
│?? │?? ├── DeviceControlActivity$3.class
│?? │?? ├── DeviceControlActivity$4.class
│?? │?? ├── DeviceControlActivity.class
│?? │?? ├── DeviceScanActivity$1$1.class
│?? │?? ├── DeviceScanActivity$1.class
│?? │?? ├── DeviceScanActivity$2.class
│?? │?? ├── DeviceScanActivity$LeDeviceListAdapter.class
│?? │?? ├── DeviceScanActivity$ViewHolder.class
│?? │?? ├── DeviceScanActivity.class
│?? │?? ├── R$attr.class
│?? │?? ├── R$dimen.class
│?? │?? ├── R$drawable.class
│?? │?? ├── R$id.class
│?? │?? ├── R$layout.class
│?? │?? ├── R$menu.class
│?? │?? ├── R$string.class
│?? │?? ├── R$style.class
│?? │?? ├── R.class
│?? │?? └── SampleGattAttributes.class
│?? ├── classes.dex
│?? ├── dexedLibs
│?? │?? └── android-support-v4-87ca55ac33d0c811703ee8391c2f6d74.jar
│?? ├── jarlist.cache
│?? ├── res
│?? │?? └── crunch
│?? │?? ├── drawable-hdpi
│?? │?? │?? └── ic_launcher.png
│?? │?? ├── drawable-mdpi
│?? │?? │?? └── ic_launcher.png
│?? │?? ├── drawable-xhdpi
│?? │?? │?? └── ic_launcher.png
│?? │?? └── drawable-xxhdpi
│?? │?? └── ic_launcher.png
│?? └── resources.ap_
├── gen
│?? └── com
│?? └── example
│?? └── bluetooth
│?? └── le
│?? ├── BuildConfig.java
│?? └── R.java
├── ic_launcher-web.png
├── libs
│?? └── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
│?? ├── drawable-hdpi
│?? │?? └── ic_launcher.png
│?? ├── drawable-mdpi
│?? │?? └── ic_launcher.png
│?? ├── drawable-xhdpi
│?? │?? └── ic_launcher.png
│?? ├── drawable-xxhdpi
│?? │?? └── ic_launcher.png
│?? ├── layout
│?? │?? ├── actionbar_indeterminate_progress.xml
│?? │?? ├── gatt_services_characteristics.xml
│?? │?? └── listitem_device.xml
│?? ├── menu
│?? │?? ├── gatt_services.xml
│?? │?? └── main.xml
│?? ├── values
│?? │?? ├── dimens.xml
│?? │?? ├── strings.xml
│?? │?? └── styles.xml
│?? ├── values-sw600dp
│?? │?? └── dimens.xml
│?? ├── values-sw720dp-land
│?? │?? └── dimens.xml
│?? ├── values-v11
│?? │?? └── styles.xml
│?? └── values-v14
│?? └── styles.xml
└── src
└── com
└── example
└── bluetooth
└── le
├── BluetoothLeService.java
├── DeviceControlActivity.java
├── DeviceScanActivity.java
└── SampleGattAttributes.java
37 directories, 62 files