Skip to content

Commit

Permalink
补充api30部分蓝牙权限
Browse files Browse the repository at this point in the history
  • Loading branch information
yinbao committed May 9, 2022
1 parent 8571113 commit c558325
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions xblelibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply plugin: 'com.android.library'

apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 19
Expand All @@ -25,6 +24,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

task clearJar(type: Delete) {
Expand Down
6 changes: 6 additions & 0 deletions xblelibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<!--定位权限-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- API30 连接蓝牙 -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- API30 扫描蓝牙 -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<!-- API30 蓝牙广播 -->
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<application>
<service android:name=".server.XBleServer"/>

Expand Down

0 comments on commit c558325

Please sign in to comment.