You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@21d96a8c: AdapterService getRemoteName
at com.android.bluetooth.Utils.checkPermissionForDataDelivery(Utils.java:460)
at com.android.bluetooth.Utils.checkConnectPermissionForDataDelivery(Utils.java:492)
at com.android.bluetooth.btservice.AdapterService$AdapterServiceBinder.getRemoteName(AdapterService.java:3031)
at com.android.bluetooth.btservice.AdapterService$AdapterServiceBinder.getRemoteName(AdapterService.java:3022)
at android.bluetooth.IBluetooth$Stub.onTransact(IBluetooth.java:1219)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)
We've spotted this in our crash reporting system and also users report this. The crash occurs only on two devices:
Sony Xperia 1 IV
Sony Xperia 5 IV
with Android 13 (but I guess it could be also Android 12).
While this looks like an OS-specific issue, or at least "different, more rigorous behavior", we obviously can't wait for Sony to fix this so we're looking for fix/workaround on our side.
We can't say for 100% that this crash is caused by Voxeet, but there's no other library in our app that may call Bluetooth APIs. Also we don't have any of those devices so we can't verify if detaching Voxeet from the app fixes the crash.
But what I've spotted in the code is that despite of some changes that were done when adjusting Voxeet SDK Android and Voxeet SDK Android Audio to not crash when BLUETOOTH_CONNECT is not granted, there are still some android.bluetooth.* APIs called from Voxeet that don't catch SecurityException.
I'm looking at BluetoothHeadsetServiceListener and in the constructor I can see following code
As you can see there's a call to obtain BluetoothAdapter and it doesn't catch SecurityException, only VerifyError. This looks somehow related to the crash stacktrace where we can see AdapterService class. Not sure if this is the only place, there could be other ones.
I'm wondering if Voxeet SDK could be more cautious when it comes to using any Bluetooth system API. I mean, any call to android.bluetooth.* could be wrapped with try-catch block, so that any error raised by it won't stop the app from working, as Bluetooth is not a necessary functionality for the app/Voxeet SDK to work.
Let me know if you need any more details/information. We're using Voxeet Android SDK 3.8.0 at the moment.
The text was updated successfully, but these errors were encountered:
Hi, we get following crash on app startup:
We've spotted this in our crash reporting system and also users report this. The crash occurs only on two devices:
with Android 13 (but I guess it could be also Android 12).
While this looks like an OS-specific issue, or at least "different, more rigorous behavior", we obviously can't wait for Sony to fix this so we're looking for fix/workaround on our side.
We can't say for 100% that this crash is caused by Voxeet, but there's no other library in our app that may call Bluetooth APIs. Also we don't have any of those devices so we can't verify if detaching Voxeet from the app fixes the crash.
But what I've spotted in the code is that despite of some changes that were done when adjusting Voxeet SDK Android and Voxeet SDK Android Audio to not crash when
BLUETOOTH_CONNECT
is not granted, there are still someandroid.bluetooth.*
APIs called from Voxeet that don't catchSecurityException
.I'm looking at
BluetoothHeadsetServiceListener
and in the constructor I can see following codeAs you can see there's a call to obtain
BluetoothAdapter
and it doesn't catchSecurityException
, onlyVerifyError
. This looks somehow related to the crash stacktrace where we can seeAdapterService
class. Not sure if this is the only place, there could be other ones.I'm wondering if Voxeet SDK could be more cautious when it comes to using any Bluetooth system API. I mean, any call to
android.bluetooth.*
could be wrapped with try-catch block, so that any error raised by it won't stop the app from working, as Bluetooth is not a necessary functionality for the app/Voxeet SDK to work.Let me know if you need any more details/information. We're using Voxeet Android SDK 3.8.0 at the moment.
The text was updated successfully, but these errors were encountered: