Open navr32 opened 2 years ago
What is the Android version? This API was introduced in Android 8.0.
https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder#setPhy(int)
The Android Version is 7.0
Any help ? I have seen and test the project https://github.com/kai-morich/SimpleBluetoothLeTerminal and the app on the appstore this app work at first time with my bluetooth LE device and my Android phone on Android 7.0 i have scroll the code and i found any use of setPhy ...? Could be possible to have the same method for Bleak to be able to use phone with olders Android with Bleak ? many thanks.
Android 8.0 is already 5 years old, so that seems like a reasonable minimum system requirement to me. But if someone wants to take responsibility for ensuring compatibility of older versions of Android, I wouldn't be opposed to a pull request that adds runtime version checks around newer api calls.
Perhaps this will be more nice to add a Legacy Backend for old Android. Because your code is pretty good i think this will be very annoying to add many runtime version checks ? But problems if the app must run on anothers versions of android phone...how to manage on the same app the use of two API;....so the only solution perhaps will be runtime version check ...so very hard work..again..i haven't time for all this now.. It is very sad ..and again this a waste of phone that will be obsolete and go to garbage ..sad world.
bluetoothctl -v
) in case of Linux: bluetoothctl: 5.64I run the kivy demo on linux mode ok "python main.py" ! The scanner started work and find bluetooth...and so. After i Build with buildozer android debug deploy run logcat ...the build is ok ..and the deploy ok..the app start.. But after start show screen message "scanning" but the app crash.
The final message on debug log is
So i have search in sanner.py and the setPhy attribute is here at some line under 108...very surprised of this error and i don't find anything about this to have a trick..i have search on p4android forum too..because this the android backend ..but any subject about this.. perhaps a missing dependencies ?
crashback: