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

Support for Companion device pairing? #272

Open
lwinged opened this issue May 15, 2021 · 1 comment
Open

Support for Companion device pairing? #272

lwinged opened this issue May 15, 2021 · 1 comment
Labels
Android Android-specific ticket enhancement New feature or request

Comments

@lwinged
Copy link

lwinged commented May 15, 2021

Hello,

I'd like to know if you will integrate this feature to avoid ask the user the location permission ?

https://developer.android.com/guide/topics/connectivity/companion-device-pairing

My app needs to scan devices but I don't need/want the location permission. (ACCESS_FINE_LOCATION)

My app targets min sdk Android 7

I saw that the scan method has a parameter : requireLocationServicesEnabled

With this parameter can I scan without ask the user for location permission?

Perhaps do you have any solutions about that?

Do I need implement this feature in my app for Android 8+ or the companion devices pairing can be a feature/ an evolution of ble library ?

Thank you very much.

@remonh87
Copy link
Contributor

Hi
I understand your request and I agree that the choice of Google to tie the location permission to ble scanning is not ideal and can raise privacy concerts.

I think it can be a good addition to our library in the future given that the underlying Android library supports it. Also since it works on the background we need to figure out how to nicely integrate it. @werediver do you know if iOS has something that looks like this?

Keep in mind that companion device pairing is a totally different user experience than "normal scanning/connecting/pairing" . Users are offered a dialog of devices in the vicinity and will be provide a dialog to link it to the app.

The requireLocationServicesEnabled parameter just makes sure that the stream throws an exception that you can handle in case the location is not enabled. Reason for this is that on some Android devices (especially Nexus) ble scanning does not yield results when the users has location service off.

On the short term I have other priorities but feel free to contribute to this library. Also I am willing to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android-specific ticket enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants