Crash initialising the SDK on Android 12 devices for apps targeting Android 12
neeraj-nh opened this issue · 4 comments
neeraj-nh commented
Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@86eda928: getName
at android.os.Parcel.createExceptionOrNull(Parcel.java:2425)
at android.os.Parcel.createException(Parcel.java:2409)
at android.os.Parcel.readException(Parcel.java:2392)
at android.os.Parcel.readException(Parcel.java:2334)
at android.bluetooth.IBluetoothManager$Stub$Proxy.getName(IBluetoothManager.java:802)
at android.bluetooth.BluetoothAdapter.getName(BluetoothAdapter.java:1297)
at live.hms.video.audio.HMSBluetoothManager.logBluetoothAdapterInfo(HMSBluetoothManager.java:431)
at live.hms.video.audio.HMSBluetoothManager.start(HMSBluetoothManager.java:257)
at live.hms.video.audio.HMSAudioManager.start(HMSAudioManager.java:299)
at live.hms.video.sdk.SDKDelegate$join$2$1$1.invokeSuspend(SDKDelegate.kt:540) ...
SDK version: Not using the Android SDK directly but using the HMS react native SDK v0.8.0
ygit commented
PratimMallick commented
@neeraj-nh Please add the following permission to your app's manifest file
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
and take the permission from user before HMSSDK.join() is called
PratimMallick commented
Closing this issue as application needs to add this permission
AniketSK commented
Updating with the reason the bluetooth permission is required on android 12
https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher