Skip to content

Commit

Permalink
[fix] Android 12 permission
Browse files Browse the repository at this point in the history
  • Loading branch information
JCxYIS committed Jun 8, 2024
1 parent 008a177 commit 6c3360e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions UnityBluetooth-AndroidStudio/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Bluetooth permission. refer to https://developer.android.com/develop/connectivity/bluetooth/bt-permissions -->
<!-- Request legacy Bluetooth permissions on older devices. (Android <12) -->
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />

<!-- Android >=12 -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />-->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- Android > 10 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- Android >=10 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- Android 9 -->

<application />
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions UnityBluetooth-Unity/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.0
bundleVersion: 1.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand All @@ -160,7 +160,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 1
AndroidBundleVersionCode: 110
AndroidMinSdkVersion: 19
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
Expand Down

0 comments on commit 6c3360e

Please sign in to comment.