opentok / opentok-android-sdk-samples

Sample applications illustrating best practices using OpenTok Android SDK.
https://tokbox.com/developer/sdks/android/
MIT License
211 stars 169 forks source link

Calling crashes on Android 12 with error regarding BLUETOOTH_CONNECT permission. Log trace in comments #405

Closed salmanjawedfolio closed 1 year ago

salmanjawedfolio commented 2 years ago

Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@a0cbd704: HeadsetService 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.IBluetoothHeadset$Stub$Proxy.getConnectedDevicesWithAttribution(IBluetoothHeadset.java:1040) at android.bluetooth.BluetoothHeadset.getConnectedDevices(BluetoothHeadset.java:549) at com.opentok.android.DefaultAudioDevice$6.onServiceConnected(:22) at android.bluetooth.BluetoothHeadset$3.handleMessage(BluetoothHeadset.java:1422) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7842) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

v-kpheng commented 1 year ago

Thanks, @salmanjawedfolio, for filing this issue.

Closing, since this has been fixed by newer versions of the SDK. If you're still able to reproduce using the most recent version, please file another issue. Thanks!