android 5.0 ble demo,Android BLE蓝牙例子(包括android版Lightblue)实例源码
【實例簡介】
源碼里面有Bluetooth4_3/BLEDemo/Android_Lightblue.apk三個.前兩個是BLE的demo。BLEDemo這個功能較Bluetooth4_3多一些,有興趣的可以都看下。Android_Lightblue.apk是Android版的lightblue,在進行ble開發的時候用該app作為輔助工具還是非常不錯的,功能較Bluetooth4_3 BLEDemo 這兩個demo都強大。不過Android_Lightblue.apk在android5.0以上的版本手機上運行不起來,我也沒有該app的源碼。看看后面會不會有更新。對應博客地址:http://blog.csd
【實例截圖】
【核心代碼】
BLE
├── Android_Lightblue.apk
├── BLEDemo
│?? ├── AndroidManifest.xml
│?? ├── bin
│?? │?? ├── AndroidManifest.xml
│?? │?? ├── classes
│?? │?? │?? └── org
│?? │?? │?? └── bluetooth
│?? │?? │?? └── bledemo
│?? │?? │?? ├── BleDefinedUUIDs$Characteristic.class
│?? │?? │?? ├── BleDefinedUUIDs$Descriptor.class
│?? │?? │?? ├── BleDefinedUUIDs$Service.class
│?? │?? │?? ├── BleDefinedUUIDs.class
│?? │?? │?? ├── BleNamesResolver.class
│?? │?? │?? ├── BleWrapper$1.class
│?? │?? │?? ├── BleWrapper$2.class
│?? │?? │?? ├── BleWrapper$3.class
│?? │?? │?? ├── BleWrapper.class
│?? │?? │?? ├── BleWrapperUiCallbacks$Null.class
│?? │?? │?? ├── BleWrapperUiCallbacks.class
│?? │?? │?? ├── BuildConfig.class
│?? │?? │?? ├── CharacteristicDetailsAdapter$1.class
│?? │?? │?? ├── CharacteristicDetailsAdapter$2.class
│?? │?? │?? ├── CharacteristicDetailsAdapter$3.class
│?? │?? │?? ├── CharacteristicDetailsAdapter$FieldReferences.class
│?? │?? │?? ├── CharacteristicDetailsAdapter.class
│?? │?? │?? ├── CharacteristicsListAdapter$FieldReferences.class
│?? │?? │?? ├── CharacteristicsListAdapter.class
│?? │?? │?? ├── DeviceListAdapter$FieldReferences.class
│?? │?? │?? ├── DeviceListAdapter.class
│?? │?? │?? ├── HRDemoActivity$1.class
│?? │?? │?? ├── HRDemoActivity$2.class
│?? │?? │?? ├── HRDemoActivity$3.class
│?? │?? │?? ├── HRDemoActivity$4.class
│?? │?? │?? ├── HRDemoActivity$5.class
│?? │?? │?? ├── HRDemoActivity.class
│?? │?? │?? ├── PeripheralActivity$10.class
│?? │?? │?? ├── PeripheralActivity$11.class
│?? │?? │?? ├── PeripheralActivity$1.class
│?? │?? │?? ├── PeripheralActivity$2.class
│?? │?? │?? ├── PeripheralActivity$3.class
│?? │?? │?? ├── PeripheralActivity$4.class
│?? │?? │?? ├── PeripheralActivity$5.class
│?? │?? │?? ├── PeripheralActivity$6.class
│?? │?? │?? ├── PeripheralActivity$7.class
│?? │?? │?? ├── PeripheralActivity$8.class
│?? │?? │?? ├── PeripheralActivity$9.class
│?? │?? │?? ├── PeripheralActivity$ListType.class
│?? │?? │?? ├── PeripheralActivity.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
│?? │?? │?? ├── ScanningActivity$1.class
│?? │?? │?? ├── ScanningActivity$2.class
│?? │?? │?? ├── ScanningActivity$3.class
│?? │?? │?? ├── ScanningActivity.class
│?? │?? │?? ├── ServicesListAdapter$FieldReferences.class
│?? │?? │?? └── ServicesListAdapter.class
│?? │?? └── jarlist.cache
│?? ├── gen
│?? │?? └── org
│?? │?? └── bluetooth
│?? │?? └── bledemo
│?? │?? ├── 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
│?? │?? │?? ├── activity_hrdemo.xml
│?? │?? │?? ├── activity_peripheral.xml
│?? │?? │?? ├── activity_scanning_item.xml
│?? │?? │?? ├── peripheral_details_characteristic_item.xml
│?? │?? │?? ├── peripheral_list_characteristic_item.xml
│?? │?? │?? ├── peripheral_list_services_header.xml
│?? │?? │?? ├── peripheral_list_services_item.xml
│?? │?? │?? └── progress_indicator.xml
│?? │?? ├── menu
│?? │?? │?? ├── peripheral.xml
│?? │?? │?? └── scanning.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
│?? └── org
│?? └── bluetooth
│?? └── bledemo
│?? ├── BleDefinedUUIDs.java
│?? ├── BleNamesResolver.java
│?? ├── BleWrapper.java
│?? ├── BleWrapperUiCallbacks.java
│?? ├── CharacteristicDetailsAdapter.java
│?? ├── CharacteristicsListAdapter.java
│?? ├── DeviceListAdapter.java
│?? ├── HRDemoActivity.java
│?? ├── PeripheralActivity.java
│?? ├── ScanningActivity.java
│?? └── ServicesListAdapter.java
└── Bluetooth4_3
└── Bluetooth4_3
├── AndroidManifest.xml
├── bin
│?? ├── AndroidManifest.xml
│?? ├── Bluetooth4_3.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
│?? │?? ├── MainActivity.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-a35b868f25440c845f65d7acf67a8a25.jar
│?? │?? └── android-support-v4-bcd3d5a754016d41cbb9ebf6ce42c0af.jar
│?? ├── jarlist.cache
│?? ├── res
│?? │?? ├── 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
│?? │?? ├── activity_main.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
├── MainActivity.java
└── SampleGattAttributes.java
64 directories, 163 files
總結
以上是生活随笔為你收集整理的android 5.0 ble demo,Android BLE蓝牙例子(包括android版Lightblue)实例源码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 为什么全天坐在电脑前会让你精疲力竭
- 下一篇: 1045-Access denied f