Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[connectivity] Enable fetching current Wi-Fi network's BSSID #1331

Merged
merged 15 commits into from
Apr 15, 2019
Merged

[connectivity] Enable fetching current Wi-Fi network's BSSID #1331

merged 15 commits into from
Apr 15, 2019

Conversation

vincevargadev
Copy link
Contributor

Usage:

wifiBSSID = await _connectivity.getWifiBSSID();

Vince Varga added 6 commits March 11, 2019 14:41
I also created a helper method findNetworkInfo to reduce code duplication for getting the BSSID and SSID of the current network.
I also created a helper method getWifiInfo to reduce code duplication for getting the BSSID and SSID of the current network.
@vincevargadev vincevargadev requested a review from cyanglaz as a code owner March 11, 2019 14:34
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@vincevargadev
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@vincevargadev
Copy link
Contributor Author

I'm not sure why continuous-integration/travis-ci/pr — The Travis CI build failed is failing. I didn't see it in other merge requests.

/// Please note that it DOESN'T WORK on emulators (returns null).
///
/// From android 8.0 onwards the GPS must be ON (high accuracy)
/// in order to be able to obtain the SSID.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SSID -> BSSID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed it: 8033d9e

@vincevargadev
Copy link
Contributor Author

Is there something else I should fix?

@amirh
Copy link
Contributor

amirh commented Mar 29, 2019

Thanks for contributing!

To keep the plugins repository scalable we should try to not introduce new features without e2e tests.
The plugins e2e test harness was just recently introduced, and the first e2e test for the connectivity plugin wasn't written yet, I filed flutter/flutter#30210 to setup e2e testing for connectivity, and I think we should wait for that(or alternatively have this PR add the first connectivity feature that's tested e2e). See: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore/example/test_driver for what the e2e tests might look like.

I'm marking this PR as waiting for test harness.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing this PR. The changes look good. We require any new features added to the plugin to have test driver tests. I have created a PR to set up test driver on this plugin. https://github.com/flutter/plugins/pull/1455/files
Could you wait until the PR landed and adding a test for your change? If you don't have time to continue working on this, we can shepherd it from here.
For more details on test driver test, you can refer to https://flutter.dev/docs/cookbook/testing/integration/introduction and our contribution guide here https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md

packages/connectivity/lib/connectivity.dart Outdated Show resolved Hide resolved
Based on cyanglaz's suggestion in PR #1331

Co-Authored-By: vargavince91 <vargavince91@gmail.com>
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Apr 8, 2019
@vincevargadev
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Apr 8, 2019
@vincevargadev
Copy link
Contributor Author

I can resolve the conflicts and add the driver tests this week (though not sure which day).

@collinjackson
Copy link
Contributor

@cyanglaz I added tests and resolved conflicts, can I get your lgtm to merge this?

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one little thing in the test code.

@collinjackson collinjackson merged commit fdd5189 into flutter:master Apr 15, 2019
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants