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

Set versionSdkInt #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paulpv
Copy link
Contributor

@paulpv paulpv commented Mar 14, 2019

Before I found this [Android-Scanner-Compat-Library] library, I had rolled my own and allowed my code to set the version of the scanner it wanted to use.
We could ask a user to change the version to something else, and sometimes that fixed things.
Perhaps y'all would think this change is helpful too.

@philips77
Copy link
Member

That could easily cause a crash when you set too high SDK version. May I ask, what is the reason for this change? You want to use the older API despite having newer? Internally, in Android, the old, deprecated API is implemented using new one, if you look into it, so I see no reason why that could help.

@paulpv
Copy link
Contributor Author

paulpv commented Mar 15, 2019

Unless I am missing something, if sdk it set higher than Build.VERSION_CODES.O it will just use BluetoothLeScannerImplOreo.
I used this in my private code originally developed in the Lollipop/Marshmallow days as an option to test compatibility problems, and figured it could be helpful in the future if there are other changes.
I was not and am not aware of the underlying Android impl.
If it really is moot to set the library to use API 18 on an API 28 device, then feel free to reject this PR...although in final defense, accepting this PR would facilitate providing empirical proof that the setting is moot, and without this ability it would be much harder to prove that the setting is moot.
Feel free to reject, but I considered it a harmless addition.

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.

None yet

2 participants