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

Connect on Android Q #46

Merged

Conversation

eliaslecomte
Copy link
Contributor

Description

On Android Q/10 (sdk 29) it is no longer possible to connect to a wifi network via WifiManager.enableNetwork(WifiConfiguration). I've implemented the required changes.

Related issues:

Solution

As you can see in the PR, I create a WifiNetworkSpecifier. With that, I do ConnectivityManager.requestNetwork(NetworkRequest).
Once the network is available, i bind it so the complete app can execute api calls over the wifi network.

Currently only tested with a wpa2 network. Other apps or the OS can't use this network. When your app is stopped, the network connection is stopped. This is completely my case (connect to an IoT AP, perform setup). I am not sure how others use this library?

Set password for wpa2 (psk or eap).
@ThanosFisherman
Copy link
Owner

Hello @eliaslecomte Thank you so much for your contribution.

Please give me some time to review this pull request on this weekend. I don't have much time during the week because of my full time job.

I will keep you posted.

@eliaslecomte
Copy link
Contributor Author

eliaslecomte commented Jan 15, 2020

Hello @eliaslecomte Thank you so much for your contribution.

Please give me some time to review this pull request on this weekend. I don't have much time during the week because of my full time job.

I will keep you posted.

Thanks for the response! I understand, we all work 💰.
This isn't finished, but I hope to get good feedback from you :-).

Copy link
Owner

@ThanosFisherman ThanosFisherman left a comment

Choose a reason for hiding this comment

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

Thanks again for your work. This looks quite alright for now. I can't really test it thoroughly as I do not possess an android 10 device yet but I will proceed on a merge anyway as some people are in a hurry to use this therefore they can be our testers for now.

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.

2 participants