Android-BLE-Library-version-1x.zip
大小:87.26KB
价格:41积分
下载量:0
评分:
5.0
上传者:f000102
更新日期:2024-09-02

Android-BLE-Library-version-1x.zip

资源文件列表(大概)

文件名
大小
Android-BLE-Library-version-1x/
-
Android-BLE-Library-version-1x/.gitignore
56B
Android-BLE-Library-version-1x/LICENSE
1.47KB
Android-BLE-Library-version-1x/README.md
3.04KB
Android-BLE-Library-version-1x/ble/
-
Android-BLE-Library-version-1x/ble/.gitignore
7B
Android-BLE-Library-version-1x/ble/build.gradle
3.48KB
Android-BLE-Library-version-1x/ble/proguard-rules.pro
751B
Android-BLE-Library-version-1x/ble/src/
-
Android-BLE-Library-version-1x/ble/src/main/
-
Android-BLE-Library-version-1x/ble/src/main/AndroidManifest.xml
316B
Android-BLE-Library-version-1x/ble/src/main/java/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/BleManager.java
71.96KB
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/BleManagerCallbacks.java
7.04KB
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/Request.java
15.28KB
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/error/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/error/GattError.java
5.8KB
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/utils/
-
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/utils/ILogger.java
2.29KB
Android-BLE-Library-version-1x/ble/src/main/java/no/nordicsemi/android/ble/utils/ParserUtils.java
2.39KB
Android-BLE-Library-version-1x/ble/src/main/res/
-
Android-BLE-Library-version-1x/ble/src/main/res/values/
-
Android-BLE-Library-version-1x/ble/src/main/res/values/strings.xml
1.88KB
Android-BLE-Library-version-1x/build.gradle
704B
Android-BLE-Library-version-1x/gradle.properties
730B
Android-BLE-Library-version-1x/gradle/
-
Android-BLE-Library-version-1x/gradle/wrapper/
-
Android-BLE-Library-version-1x/gradle/wrapper/gradle-wrapper.jar
52.38KB
Android-BLE-Library-version-1x/gradle/wrapper/gradle-wrapper.properties
233B
Android-BLE-Library-version-1x/gradlew
4.85KB
Android-BLE-Library-version-1x/gradlew.bat
2.26KB
Android-BLE-Library-version-1x/settings.gradle
14B

资源内容介绍

Android-BLE-Library-version-1x.zip
# Android BLE Library[ ![Download](https://api.bintray.com/packages/nordic/android/ble-library/images/download.svg?version=1.2.0) ](https://bintray.com/nordic/android/ble-library/1.2.0/link)This library has been extracted from [nRF Toolbox](https://github.com/NordicSemiconductor/Android-nRF-Toolbox)project. It contains classes useful when doing a connection to a Bluetooth LE device.## Features**BleManager** class provides the following features:1. Connection2. Service discovery3. Bonding (optional)4. Enabling Service Changed indications5. Device initialization6. Async BLE operations using queue7. Reading Battery Level value8. Requesting MTU and connection priority9. Error handling10. Logging (in nRF Logger)The library **does not provide support for scanning** for Bluetooth LE devices.For scanning, we recommend using [Android Scanner Compat Library](https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library)which brings almost all recent features, introduced in Lollipop and later, to the older platforms. ## Importing#### Maven or jcenterThe library may be found on jcenter and Maven Central repository. Add it to your project by adding the following dependency:```grovyimplementation 'no.nordicsemi.android:ble:1.2.0'```#### ManualClone this project and add *ble* module as a dependency to your project:1. In *settings.gradle* file add the following lines:```groovyinclude ':ble'project(':ble').projectDir = file('../Android-BLE-Library/ble')```2. In *app/build.gradle* file add `implementation project(':ble')` inside dependencies.3. Sync project and build it.See example projects listed below.## Recent changes:Some things has changed before the lib graduated to 1.x. Those are:1. Request class has been extracted to a standalone class, importing this class may be required.2. Current MTU is now available in the BleManager. Use `getMtu()` to get the value. Request change using `requestMtu(int)` as before.## How to use itFind the simple example here [Android nRF Blinky](https://github.com/NordicSemiconductor/Android-nRF-Blinky).For an example how to use it from an Activity or a Service, check the base Activity and Service classes in [nRF Toolbox](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/tree/master/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile).1. Define your device API by extending `BleManagerCallbacks`:[example](https://github.com/NordicSemiconductor/Android-nRF-Blinky/blob/master/app/src/main/java/no/nordicsemi/android/blinky/profile/BlinkyManagerCallbacks.java)2. Extend `BleManager` class and implement required methods:[example](https://github.com/NordicSemiconductor/Android-nRF-Blinky/blob/master/app/src/main/java/no/nordicsemi/android/blinky/profile/BlinkyManager.java)For examples of BLE Library v1.x please use older branches of above projects.## Version 2.0Please, check version 2.0 on *master* branch. Version 2 adds more features (for example synchronous requests, and more), is "almost" backwards compatible (a lot of old API has been deprecated).

用户评论 (0)

发表评论

captcha