Closed HernanOsorio closed 1 year ago
Despite what the app permissions dialog on your phone says, there is no Bluetooth "Nearby devices" permission ( there is one for wifi). The error message and the Android documentation may help https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare
The issue has been fixed on python-for-android
develop
branch.
When using a newer Android API, one of our dependencies (SDL2) was failing to set up during runtime. (This is only happening for apps that are declaring BLUETOOTH
into AndroidManifest).
The recent updates made to sdl2
, also added improved support for the newer android API.
Versions
Description
Hi to everyone, guys I need help and I don't know how to address this problem, my app uses Bluetooth as one of the features to print on BlueTooth printers, since Nov 1, 2022, google play store require to update any app to Android 31 which change how the permission is requested specifically with bluetooth features, before Android 31, I just request BLUETOOTH and BLUETOOTH_ADMIN at permission lines in the buildozer.spec file. Android 31 needs runtime permission to work with bluetooth (nearby devices), my app specifically needs BLUETOOTH_CONNECT which creates a link with devices already paired., I added the BLUETOOTH_CONNECT at buildozer file and also added it at main.py using android.permission([Permissions.BLUETOOTH_CONNECT]). I also added a new permssion.py file created by Robert Flatt that includes the new changes from Android 31 at .buildozer folder of my project. Does not matter what I did, my app never asks for NEARBY DEVICES permission at runtime, and the app crash, the only way for the app to work is by going to APP INFO and manually providing the permissions. How can I request permission for NEARBY DEVICES at runtime? Any help will be very appreciated.
buildozer.spec
Command:
Spec file:
Logs