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

Change ScanResult#isConnectable from nullable boolean to non-nullable enum #588

Open
mikolak opened this issue Apr 9, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mikolak
Copy link
Collaborator

mikolak commented Apr 9, 2021

#586 (comment)

Connectivity with 3 states:
Connectivity.noInfo (or notAvailable?), Connectivity.notConnectable, Connectivity.Connectable

@mikolak mikolak mentioned this issue Apr 9, 2021
@okocsis
Copy link
Contributor

okocsis commented Apr 12, 2021

Right now it's Bool? isConnectable so ternarily [null, false, true]
it's nullable because it's only available on iOS host OS, on android it is still connectable so null very importantly does not mean false at all!
Therefore I'd also recommend using a less misleading representation being the
enum Connectivity [ .notAvailable| .unsupported, . notConnectable, .connectable]
correspondingly mapping to the Bool? values above.

@mikolak mikolak added the enhancement New feature or request label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants