Open JakobTO2matic opened 2 months ago
Hello, Sorry for the long delay, I was busy with other projects.
Did you try restarting the phone? The error 128, which you get in onServiceRegistered is perhaps NO_RESOURCES
:
https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/5738f83aeb59361a0a2eda2460113f6dc9194271/stack/include/gatt_api.h#49
Your code looks OKish and should work, if works on other phones.
Yes, I have tried to restart the device, but I will give it an extra try and report back.
Best regards,
Jakob Tørsløv Product Developer
[cid:86a9d2b7-f2c4-4341-834d-650d6875d5d8]
Mobil: +45 27 24 43 61 Mail: @.*** Web: www.o2matic.com
O2matic ApS Nørrelundvej 10 2730 Herlev Denmark Tlf: +45 50 52 98 10 [cid:9363199a-196f-4304-85eb-1ac789388373]
Fra: Aleksander Nowakowski @.> Sendt: 27. september 2024 09:20 Til: NordicSemiconductor/Android-Scanner-Compat-Library @.> Cc: Jakob Tørsløv @.>; Author @.> Emne: Re: [NordicSemiconductor/Android-Scanner-Compat-Library] BluetoothLeScannerCompat.startScan fails on Google pixel 8 with android 14 and API 34-ext12 (Issue #148)
Hello, Sorry for the long delay, I was busy with other projects.
Did you try restarting the phone? The error 128, which you get in onServiceRegistered is perhaps NO_RESOURCES: https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/5738f83aeb59361a0a2eda2460113f6dc9194271/stack/include/gatt_api.h#49 Your code looks OKish and should work, if works on other phones.
— Reply to this email directly, view it on GitHubhttps://github.com/NordicSemiconductor/Android-Scanner-Compat-Library/issues/148#issuecomment-2378583162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BG7RERII2SSLKUKCH736IFTZYUBNNAVCNFSM6AAAAABM3UDBAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZYGU4DGMJWGI. You are receiving this because you authored the thread.Message ID: @.***>
When I start scanning for bluetooth devices using BluetoothLeScannerCompat, the scan immedietly stops with error code 2 SCAN_FAILED_APPLICATION_REGISTRATION_FAILED. This does not happen when using a Samsung phone, tablet (S22, S23, A9) or Oneplus phones. The scan is only started once, so i dont think it is an abundance of scans that is the issue, but i could be wrong.
Code for starting the scan:
Permissions asked for during runtime:
I have tried to use
ACCESS_FINE_LOCATION
withBLUETOOTH_SCAN
while removingandroid:usesPermissionFlags="neverForLocation"
, but it does not resolve the issue.Logcat log: