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

Fixed Samples ScanActivity crashing with SecurityException #800

Merged
merged 2 commits into from Jul 5, 2022

Conversation

dariuszseweryn
Copy link
Owner

@dariuszseweryn dariuszseweryn commented Jun 30, 2022

Problem: calling BluetoothDevice#getName on API >=31 needs android.permission.BLUETOOTH_CONNECT permission.
Solution: call ScanRecord#getDeviceName instead. Secure RxBleDevice#toString from throwing a SecurityException.

Fixes #798

Problem: calling BluetoothDevice#getName on API >=31 needs `android.permission.BLUETOOTH_CONNECT` permission.
Solution: call ScanRecord#getDeviceName instead
toString accessed BluetoothDevice#getName() which needs BLUETOOTH_CONNECT permission on API >=31
@dariuszseweryn dariuszseweryn merged commit 01551b5 into master Jul 5, 2022
@dariuszseweryn dariuszseweryn deleted the fix/sample_scan_device_name branch July 9, 2022 13:19
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

Successfully merging this pull request may close these issues.

Android 12 running java example (sample)
1 participant