Skip to content
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

Google kills app due to not requesting Bluetooth permissions at runtime, but library doesn't have a max SDK version set #11

Open
interfect opened this issue Dec 5, 2022 · 1 comment

Comments

@interfect
Copy link

As of SDK version 31, your app will be killed (or at least not work?) if you try to use Bluetooth without requesting permissions for it at runtime: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher

Apparently if you set a max SDK verison of 30 you get to use the old permissions model, but Google didn't tell anyone that years ago when this library was being written, so of course nobody magically saw the future and wrote the old code to complain if used in an app that uses too new of an SDK.

Either the library should be set to hint to the build process that it won't work on SDK versions later than 30, or else the library should be updated to do the runtime permission flow, or at least to poll for the required permissions and not try to make the forbidden calls if the app hasn't acquired them.

This seems to be causing https://gitlab.com/staltz/manyverse/-/issues/2135

See also: %yYOy7KnB/KEIa/eLAjCRGvsfAXkjGGiiAPLJun1kB08=.sha256 and %Rgge2u/qxEtF4zIObUUnCZA0PjDij+E42w0OBF1JaQo=.sha256

@staltz
Copy link
Contributor

staltz commented Dec 5, 2022

Thanks for pre-debugging this for us! I'm a bit puzzled, because we do have runtime permission dialogs to enable Bluetooth, but maybe the code in this library does something else on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants