Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/a1anwang/okble
Browse files Browse the repository at this point in the history
  • Loading branch information
a1anwang committed Jun 1, 2018
2 parents 5ce9b4e + 145912a commit 682b87e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# okble: An easy-to-use BLE library for Android
test

## [中文](https://github.com/a1anwang/okble/blob/master/README_zh.md) | English
19 changes: 11 additions & 8 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@

## 功能特点:
- 简单明了,一个OKBLEDevice即可完成所有通讯操作
- 顺序执行通讯操作,BLE内部是不允许同时执行多次通讯的,okble使用队列让操作排队,先进先执行,保证所有的操作都能执行
- 动态权限集成,target sdk在23(android6.0)及以上时,扫描是需要定位权限的,okble已集成,会有回调告知是否已授权
- 向下兼容到API 18(android4.3),在android5.0中google变更了扫描api,okble依然使用的是4.3的api,只为了兼容更多的手机
- 双回调,处理灵活:定义了统一的listener来监听设备的状态, 也可以为每一个蓝牙通讯操作设置单独的监听,方便页面多的情况下使用
- 自动连接:断开后可以实现自动连接,直到连接成功
- 自动识别write type,自动识别notify or indicate
- 顺序执行通讯操作,BLE内部是不允许同时执行多次通讯的okble使用队列让操作排队先进先执行保证所有的操作都能执行
- 动态权限集成target sdk在23(android6.0)及以上时, 扫描是需要定位权限的, okble已集成, 会有回调告知是否已授权
- 向下兼容到API 18(android4.3)在android5.0中google变更了扫描apiokble依然使用的是4.3的api只为了兼容更多的手机
- 双回调处理灵活:定义了统一的listener来监听设备的状态也可以为每一个蓝牙通讯操作设置单独的监听方便页面多的情况下使用
- 自动重连:断开后可以实现自动连接直到连接成功
- 自动识别write type自动识别notify or indicate
- 多设备连接管理简单

- 支持APP模拟成外设,支持APP模拟成iBeacon
- 支持扫描识别iBeacon,支持iBeacon区域的进入和退出检测


## 立即开始
#### 添加依赖
```
Expand All @@ -27,7 +30,7 @@
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.a1anwang:okble:1.0.2'
implementation 'com.github.a1anwang:okble:1.0.3'
}
```
#### 扫描外设
Expand Down

0 comments on commit 682b87e

Please sign in to comment.