QuickBlox / quickblox-android-sdk

QuickBlox Android SDK includes code snippets with main use cases and framework JAR library.
BSD 3-Clause "New" or "Revised" License
417 stars 697 forks source link

Crash on call service in android 12 #804

Closed jdprajapati closed 1 year ago

jdprajapati commented 1 year ago

Unable to create service com.quickblox.sample.chat.kotlin.services.CallService: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@5d1c4b50: getName

it's working in target sdk 30 but it's not working in 31. I have also added bluetooth connect permission

vdovbnya-qb commented 1 year ago

Hello @jdprajapati I have not been able to reproduce this problem with samples. Device: Samsung A21 - SDK12 Samples(branch - master):

None of our samples have Bluetooth logic or permissions in their manifests.

If you have added logic to work with Bluetooth, then you need to pay attention to the fact that since Android 12 and higher, changes have been made to Bluetooth permissions. more details https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher

jdprajapati commented 1 year ago

Yes I have added separate code to manage bluetooth permission. In your call service bluetooth function is added. that's why it's required. Please add same in Permission Activity in your sdk.