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

Need android.permission.BLUETOOTH_CONNECT Android 31 #282

Closed
sowens-csd opened this issue Dec 20, 2021 · 3 comments
Closed

Need android.permission.BLUETOOTH_CONNECT Android 31 #282

sowens-csd opened this issue Dec 20, 2021 · 3 comments
Labels
android bug Something isn't working

Comments

@sowens-csd
Copy link
Contributor

Somehow even after putting all new permissions above into AndroidManifest, I'm still getting:

E/AndroidRuntime(24941): Caused by: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@d04c5dd9: AdapterService getBondedDevices
on init.

This happens with SdkVersion 31 only.

As per https://issueexplorer.com/issue/stripe/stripe-terminal-android/171 and https://stackoverflow.com/questions/70245463/java-lang-securityexception-need-android-permission-bluetooth-connect-permissio/70245537, client should explicitly request BLUETOOTH_CONNECT permission, which seems doesn't happen...

@sowens-csd sowens-csd added android bug Something isn't working labels Dec 20, 2021
sowens-csd pushed a commit that referenced this issue Dec 20, 2021
@sowens-csd
Copy link
Contributor Author

Yes, I hadn't realized there was a new permission required for Android 31. I've added that to the repo version, I don't have an Android 31 device to test with, let me know if you can test it.

@rayrapetyan
Copy link
Contributor

It works! Note that app cache\storage should be cleared to trigger device to ask for a new permission, otherwise it continues to silently crash...

@sowens-csd
Copy link
Contributor Author

Thanks for testing. This is uploaded as 5.4.2 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants