-
Notifications
You must be signed in to change notification settings - Fork 146
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
Android 10 ( 29 ) is not supported - Connect to network, enable, disable and more.. #113
Comments
For me it helped setting "android-targetSdkVersion" to 28 and to manually enable GPS on the phone. Which seems to work as a workaround for now... |
it will not work for you from November 2020. |
I have a working version running on Android 10. I modified it by forking https://github.com/ViggoChavine/WifiWizard2 who already started work for API 29 and i added on top of it for my app feel free to use as a base or as is: https://github.com/VijayVaveHealth/WifiWizard2/. On Android 29 there is a bug on certain devices, so far i've seen it on Oneplus 6 and a Nokia android phone the connection dialog comes up and gets stuck in a loop. If you read stackoverflow or other websites users mention seeing this on some of their devices, there is also a google issue ticket that was started but no update so far, seems phone vendors are at fault here. It works fine on the Pixel and Samsung phones. |
hi, @VijayVaveHealth - after installing your version it seems like not working while trying to connect wifi. |
@eliadAfeka i only call the WifiWizard2.connect and in my WifiWizard.js file you will see in the connect function the calls to the android code. Android 10 devices only call add and then don't do anything else. `
|
@VijayVaveHealth so I don't understand. how can I connect with Andoird>=10? |
@VijayVaveHealth Thanks for the fix, it worked on Android 10 on my Samsung device. |
@laxman-spidey it turned to be that there is no support in WPA2, just use WPA instead and it will work. |
@VijayVaveHealth can merge your commits? |
@VijayVaveHealth your branch works perfect for me. This actually also gives me a succes back and doesn't keep hanging. So when the network is not available it keeps loading any fix for this? |
@VijayVaveHealth thanks for your work on implementing API level 29, unfortunately on Ionic 3 I receive a strange pop up saying "Searching for devices..." when I attempt to connect to a network via the connect or add method. This also happens with using the master branch of triplfex's repo which contains ViggoChavine's API 29 fixes (I have even tried other forks with API 29 support such as TMAEDCC, but I always have the same result). I am using a Pixel 4 with Android 11. |
I also saw that a few people started working on this but actually no success. https://github.com/Pankaja13/WifiWizard2/tree/android-29 here the issue is it keeps looping and popping up the connection box. https://github.com/ScottWaring/WifiWizard2/tree/android-ten-test This looked promising but when I add it to my project I get lots of errors so no succes |
@HusFNS from what I can tell, almost all of the methods used in WifiWizard2 were deprecated. It seems that using WifiNetworkSuggestion might be the way forward now, but is only seems to support networks without an active internet connection (I assume it is intended purely for IoT). Source: https://developer.android.com/guide/topics/connectivity/wifi-suggest#java However, this may work in conjunction with above: https://developer.android.com/reference/android/provider/Settings?hl=en#ACTION_WIFI_ADD_NETWORKS |
This plugin (https://github.com/sushichop/cordova-plugin-wifi-manager) does appear to work on my Pixel 4 running Android 11, however it does not have offer functionality such as scanning for nearby networks. For now, I can run both plugins in order to achieve my goals, put perhaps the method used in cordova-plugin-wifi-manager can help with WifiWizard2's adoption of API level 29+. |
@HusFNS That fork was really intended for a specific project I am working on but there's no reason it shouldn't work. I did have trouble getting that promise returned on success so I added a less than perfect workaround. Here's how I'm using in on > Android 10:
|
I can confirm this works with Ionic 3 on a Pixel 4 with Android 11 - thanks! |
I have been working on a fix and can be tested. It works fine for me on my android 10 (samsung). The reason why he doesn't always return onUnavailable is because it is a bug in android. I made a workaround with a timout. |
Hi, I was facing same issue on my device OnePlus 6T with Android 10 and i wasn't able to connect through selected ssid. |
possible android issue? https://issuetracker.google.com/issues/158344328 |
I'm able to connect to networks now again thanks to @maxcodefaster's fork, thank you! But is it correct the wi-fi doesn't automatically turn on anymore if it's turned off? Does anybody know if there is a way to still programatically turn on wi-fi? |
@KinG-InFeT this was indeed what I said. That's why I used the workaround with the de timeout. I see @maxcodefaster used my fix and made a merge request for the master branch. |
Yes MR is inspired by @HusFNS |
How do you do it?
|
yes, i use this commit
yes, i use the new fix with timeout but out UnAvailable, i tried add more timeout but not work. My device is Samsung Tab S6 Lite Android 10 |
yes, same error |
the PR is #115 |
Like this @KinG-InFeT and @1x2x3x4x
|
yes, this is my code
(use framework7 latest version) |
i found this project and work perfectly on my table with android 10: https://github.com/Tasssadar/RequestNetworkRepro but write in Kotlin |
Did anyone encounter the following errors on Android 10? I/WifiService: addOrUpdateNetwork not allowed for uid=10773 https://github.com/sushichop/cordova-plugin-wifi-manager seems to work though, what could be the difference? |
I've finally managed to get it to work like this on Android 10, Samsung s20 and a Samsung tablet. No luck on One Plus 5T but that's their fault, not the plugin's. I've used maxcodefaster's repo.
However for some reason it won't work on a Xiaomi with Android 9. |
I am having the same problem tried WifiWizard2.connect not working on Android 10 (APK-29), it is working fine on APK-28. `declare var WifiWizard2: any;
` |
I have the fine location permission also, but I can't grant background permission
|
it appears that my problem is with Ioinc 3 and android core as I understand if anyone could make it work or have a solution for that please let me know. this is my project's android version this is the error while building |
Hello children for I have returned. I have merged PR #115 (there needs to be one or two changes since I was a bit gun-hoe on the merge). |
@arsenal942 I'm excited to see this finally merged, thank you!! 😍 I am wondering if changing the URL of the repository in |
I think it was accidental and I have asked for it to be changed back. If I
don’t get a PR, I’ll do it later today.
On Fri, 15 Jan 2021 at 9:43 pm, xLarry ***@***.***> wrote:
@arsenal942 <https://github.com/arsenal942> I'm excited to see this
finally merged, thank you!! 😍
I am wondering if changing the URL of the repository in package.json and
plugin.xml (see
https://github.com/tripflex/WifiWizard2/pull/115/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R13)
is intended? 🤔
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADO6DHH55F44TCAZVDT6T6LS2AL47ANCNFSM4RJRPO5A>
.
--
|
Fixing up the changes from PR #113
@xLarry I have fixed it |
This has finally been merged and therefore can be closed :) |
I am having the same loop issue on Android 29 on my Oneplus 6t, it connects for a second and then disconnects again. |
That error has nothing to do with the plugin. It's your OS's fault. You can go and read about it on OnePlus'es forums. Just google 'oneplus WifiNetworkSpecifier'. You'll just have to wait and see if any future update from oneplus will fix it. |
Did you find any solution for 'WiFi not available' ? I am getting the same error. I am currently using master branch on android 10. |
Did you find any solution for 'WiFi not available' ? I am getting the same error. I am currently using master branch on android 10 OnePlus |
I stoppped using this in my projects. I'm using Capacitor and works so far on the latst versions of Android and iOS: https://github.com/digaus/community-capacitor-wifi |
So the solution is simply adding location permission to the app. You can ask for it from the app, or you can test it by going to your app settings -> permissions -> location and clicking |
Prerequisites
Check all boxes if you have done the following:
Issue type
Select all that apply
Description
some actions will not be supported in Android 10 due to some Android major upgrades in their API
Steps to Reproduce
Expected behavior: success
Actual behavior: Get errors
Reproduces how often: 100%
Versions
Please include the plugin version that you are using and also include the OS, version and device you are using.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
The text was updated successfully, but these errors were encountered: