Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wumeng1 authored and wumeng1 committed Jul 8, 2021
1 parent 7ca4dc2 commit a857134
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### tools
[![](https://jitpack.io/v/mirkowu/tools.svg)](https://jitpack.io/#mirkowu/tools)



### 使用

```
implementation "com.github.mirkowu.tools:lib_ble:$ext.tools_version" //蓝牙ble
implementation "com.github.mirkowu.mvm:lib_util:$ext.mvm_version" //log工具
```
[mvm项目](https://github.com/MirkoWu/MVM)

### 功能
- [x] 蓝牙ble
- [x]
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ dependencies {
implementation "com.github.mirkowu.mvm:lib_widget:$ext.mvm_version"
implementation "com.github.mirkowu.mvm:lib_util:$ext.mvm_version"
implementation "com.github.mirkowu.mvm:lib_screen:$ext.mvm_version"

// implementation "com.github.mirkowu.tools:lib_ble:$ext.tools_version"
implementation project(':lib_ble')

}
2 changes: 1 addition & 1 deletion app/src/main/java/com/mirkowu/mvm/ble/BleActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class BleActivity : BaseActivity<EmptyMediator>() {

override fun onPermissionShowRationale(
requestCode: Int,
permissions: Array<out String>?
permissions: Array<out String>
) {
ToastUtils.showShort("检测到GPS/位置服务功能未开启,请开启 111111")
startLeScan()
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/mirkowu/mvm/ble/SearchBleActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class SearchBleActivity : BaseActivity<EmptyMediator>() {

override fun onPermissionShowRationale(
requestCode: Int,
permissions: Array<out String>?
permissions: Array<out String>
) {
ToastUtils.showShort("检测到GPS/位置服务功能未开启,请开启 111111")
startLeScan()
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ task clean(type: Delete) {
ext {
minSdkVersion = 21
targetSdkVersion = 29
compileSdkVersion = 29
compileSdkVersion = 30

mvm_version = '1.0.19'
mvm_version = '1.0.20'
tools_version = '1.0.0'
appcompat_version = '1.3.0'
core_ktx_version = '1.5.0'
lifecycle_version = '2.3.1'
Expand Down
1 change: 0 additions & 1 deletion lib_ble/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "androidx.appcompat:appcompat:$ext.appcompat_version"
implementation "com.github.mirkowu.mvm:lib_util:$ext.mvm_version"
implementation "com.github.mirkowu.mvm:lib_widget:$ext.mvm_version"
}
5 changes: 2 additions & 3 deletions lib_ble/src/main/java/com/mirkowu/lib_ble/BLEService.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.mirkowu.lib_util.LogUtil;

import java.util.List;
import java.util.UUID;

/**
* Service for managing connection and data communication with a GATT server hosted on a
Expand Down Expand Up @@ -76,8 +75,8 @@ public class BLEService extends Service {
// public final static UUID UUID_NOTIFY =
// UUID.fromString("00002a00-0000-1000-8000-00805f9b34fb");
//
private String UUID_SERVICE="00001800-0000-1000-8000-00805f9b34fb";
private String UUID_NOTIFY="00002a00-0000-1000-8000-00805f9b34fb";
private String UUID_SERVICE = "00001800-0000-1000-8000-00805f9b34fb";
private String UUID_NOTIFY = "00002a00-0000-1000-8000-00805f9b34fb";

public BluetoothGattCharacteristic mNotifyCharacteristic;

Expand Down

0 comments on commit a857134

Please sign in to comment.