-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crash for Android 12 #366
Comments
It appears that the phone's bluetooth is turned off. This is checked via: kable/core/src/androidMain/kotlin/Peripheral.kt Lines 480 to 501 in fe8ee14
Does this happen on all devices you've tried, or is it specific to certain manufactures or models? |
Thank you the update. It got worked after adding the permissions for Android 12 and enabling the bluetooth adapter. |
#335 might help in the future for checking if bluetooth is ready to use. |
Sorry for hijacking this Issue @twyatt, but would it make sense to document To make my intrusion worse: I went through the code and got the following questions, which I can turn into their own issues if thats a better place for them. They both are about documentation.
I can create a PR with such documentation if desired. |
I'm traveling at the moment, so I'll respond more thoroughly after I get back, but not a problem at all "hijacking" this issue. Love all the help in identifying documentation shortcomings. PRs very welcome. |
Experiencing app crash at Android 12, but it works fine for < Android OS v12. I've added the permissions for Android 12 too i.e, Bluetooth Connect and Bluetooth Scan.
2022-07-28 16:25:36.966 15165-15297/ E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
com.juul.kable.BluetoothDisabledException: Bluetooth adapter state is Off (10), but On (12) was required.
at com.juul.kable.PeripheralKt.checkBluetoothAdapterState(Peripheral.kt:499)
at com.juul.kable.PeripheralKt.access$checkBluetoothAdapterState(Peripheral.kt:1)
at com.juul.kable.AndroidPeripheral.connect(Peripheral.kt:231)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@e20bf2e, Dispatchers.IO]
The text was updated successfully, but these errors were encountered: