Android 10 support. Testers needed #128
Replies: 53 comments 1 reply
-
Does it have a way to connect to Wifi network as I've written here: |
Beta Was this translation helpful? Give feedback.
-
@AndroidDeveloperLB I haven't tried the root way because that's another story that involves some command line arguments plus I'm not even sure if it's gonna work. The new contribution aims to make this library connect to WiFi networks on Android 10 devices without requiring root but it's not thoroughly tested yet. |
Beta Was this translation helpful? Give feedback.
-
@ThanosFisherman Wait you have an idea of what should be done using root?
|
Beta Was this translation helpful? Give feedback.
-
That is correct, with the new api (starting Android 10), the wifi internet is only for the app that requested it. I assume the use case is more like connecting to configure IoT devices. |
Beta Was this translation helpful? Give feedback.
-
@eliaslecomte Well it's not such a nice alternative to what we had before... |
Beta Was this translation helpful? Give feedback.
-
I believe that they're trying to prevent MITM attacks by not allowing an app to connect to a subverted access point. They don't explicitly say that because you never want to give attackers suggestions. |
Beta Was this translation helpful? Give feedback.
-
" subverted access point" ? |
Beta Was this translation helpful? Give feedback.
-
No, that's why an application can't connect without recommending the connection to the user. |
Beta Was this translation helpful? Give feedback.
-
What I say is that without COARSE_LOCATION and FINE_LOCATION permissions, it's still possible to get a good guess of where you are, so that's why I think they added those into the mix. |
Beta Was this translation helpful? Give feedback.
-
Yes, you are quite correct. So rather than leave the user in the dark, they require scanning for WiFi access point to have location permissions. The user gets explicitly asked for that. |
Beta Was this translation helpful? Give feedback.
-
I tried implementing the same in a new project. The phone connects and instantly disconnects to the network, as the OnAvailable method of the NetworkCallback seems to be in a loop. Demo video |
Beta Was this translation helpful? Give feedback.
-
@singhal2 Can you please share the source code of this? |
Beta Was this translation helpful? Give feedback.
-
What network security is used (wpa2?)? |
Beta Was this translation helpful? Give feedback.
-
WPA2 and with internet. I’ll upload a sample soon.
…Sent from my iPhone
On 4 Feb 2020, at 09:02, Elias Lecomte ***@***.***> wrote:
I tried implementing the same in a new project. The phone connects and instantly disconnects to the network, as the OnAvailable method of the NetworkCallback seems to be in a loop. Demo video
What network security is used (wpa2?)?
Is it a network with or without internet?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
@singhal2 If you can make it happen even without this library, you should report it to Google: |
Beta Was this translation helpful? Give feedback.
-
Is your app targetting Android 10? If that's the case it's not actually saving the wifi configuration. You can only Disconnect in wifi settings but it's never saved in the first place. I would call the remote method first. |
Beta Was this translation helpful? Give feedback.
-
min sdk version is 23, targetSDK version is 29 |
Beta Was this translation helpful? Give feedback.
-
Regarding the sample I did some cleanups, migrated to .kts gradle scripts, renamed the @super0610 Seems like another restriction (or probably a bug on Android OS itself). You say that if you manually forget the network then WifiUtils are able to reconnect with the new password. Please Try the following:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply @ThanosFisherman |
Beta Was this translation helpful? Give feedback.
-
hi @ThanosFisherman |
Beta Was this translation helpful? Give feedback.
-
in Android 7, sample works. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update @super0610 I'm not sure yet what might be wrong or if this is an intended behavior. I'll try to investigate it and post back. |
Beta Was this translation helpful? Give feedback.
-
Thanks @ThanosFisherman |
Beta Was this translation helpful? Give feedback.
-
I'm not having a Samsung SM-T290, so I can't help on this one. If you could do any more debugging @super0610 that would be awesome. |
Beta Was this translation helpful? Give feedback.
-
Getting Error COULD_NOT_SCAN in android 10 when connecting to local hotspot created with specific ssid and password |
Beta Was this translation helpful? Give feedback.
-
Same here. Galaxy S20 connecting to a device that doesn't have an internet connection with a specific ssid and password. edit: could be an S20 specific issue. I am able to connect to the same WiFi network using Google Pixel 4a on AN10 edit 2: location was turned off on the S20. Turned it on and was able to connect |
Beta Was this translation helpful? Give feedback.
-
I have found an application and it can easily connect to wifi on android 10 device.But I don't know how it work. |
Beta Was this translation helpful? Give feedback.
-
About enabling/disabling Wifi through the library on Android 10 (and up) - I think because of the OS restrictions that have been put in place the best option would be to invoke a Settings panel:
What do you think? |
Beta Was this translation helpful? Give feedback.
-
This is logic you want to add in your app :-). The library indicates wifi is off. You show this 'error state' and the user has to take action. You can add a button that then opens the Settings screen. |
Beta Was this translation helpful? Give feedback.
-
I tried it on my Android 10 device and I get zero scanResults. |
Beta Was this translation helpful? Give feedback.
-
Please report any connectivity issues related to Android 10 here.
WiFiUtils now has a basic support for Android 10 thanks to the contribution #46 of @eliaslecomte
Hopefully owners of Android 10 devices will help us fix potential bugs.
Beta Was this translation helpful? Give feedback.
All reactions