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

Add Permission Checks #971

Open
javaman97 opened this issue Feb 9, 2023 · 3 comments
Open

Add Permission Checks #971

javaman97 opened this issue Feb 9, 2023 · 3 comments
Assignees

Comments

@javaman97
Copy link

javaman97 commented Feb 9, 2023

Description

OnStart() method requests Bluetooth On/Off Permission which may be rejected or accepted by the user and similarly ensureDiscoverable() method requests Bluetooth discoverable permission, so we need to check permission if user has alloted or not.

Branch

develop( OBDSimulator.java )

Solution

We can explicitly import check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException

check_permission_2
check_permission_1

@SebaDro
Copy link
Contributor

SebaDro commented Mar 6, 2023

Hi @javaman97 . Thanks for your contribution. I have to admit, that I do not really understand your report. Is there a critical issue with the permission check, which should be fixed? Can you explain the problem a little bit more in detail?

@javaman97
Copy link
Author

javaman97 commented Mar 6, 2023

@SebaDro Thanks for appreciating my first-ever open-source contribution.
Yes, while debugging the app, I come across this issue with adding checkPermission by the User to handle RunTime Permission.
It is a critical issue as without handling it the app will crash. We can handle it manually or by just importing the "checkselfPermission" method in it.

For more details, please refer to https://developer.android.com/training/permissions/requesting#manage-request-code-yourself

Please assign me this task, I will fix it

@SebaDro
Copy link
Contributor

SebaDro commented Jul 25, 2023

Seems reasonable to me. Feel free to work on it 😃

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

No branches or pull requests

2 participants