Skip to content

Commit

Permalink
removed bluetooth permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed Jan 18, 2024
1 parent 41009aa commit 4c5fb25
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
10 changes: 1 addition & 9 deletions packages/hms_room_kit/lib/src/common/utility_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ class Utilities {
await Permission.microphone.request();
if (Platform.isIOS) {
await Permission.bluetooth.request();
} else if (Platform.isAndroid) {
await Permission.bluetoothConnect.request();
}

await Permission.phone.request();

///We check if the permissions are granted
Expand All @@ -158,8 +155,7 @@ class Utilities {
} else if (Platform.isAndroid) {
if (await Permission.camera.isGranted &&
await Permission.microphone.isGranted &&
await Permission.phone.isGranted &&
await Permission.bluetoothConnect.isGranted) {
await Permission.phone.isGranted) {
return true;
}
}
Expand All @@ -179,10 +175,6 @@ class Utilities {
if (Platform.isIOS) {
isBluetoothPermissionsDenied =
await Permission.bluetooth.isPermanentlyDenied;
} else if (Platform.isAndroid) {
isBluetoothPermissionsDenied =
(await Permission.bluetoothConnect.isDenied &&
!await Permission.bluetoothConnect.shouldShowRequestRationale);
}

///We open the app settings if the user has permanently denied the permissions
Expand Down
4 changes: 0 additions & 4 deletions packages/hmssdk_flutter/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

<uses-permission android:name="android.permission.RECORD_AUDIO"/>

<uses-permission android:name="android.permission.BLUETOOTH" />

<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

<uses-permission android:name="android.permission.INTERNET"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Expand Down

0 comments on commit 4c5fb25

Please sign in to comment.