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

Connect to router without Internet #133

Closed
cwkhang opened this issue Jan 10, 2018 · 3 comments
Closed

Connect to router without Internet #133

cwkhang opened this issue Jan 10, 2018 · 3 comments

Comments

@cwkhang
Copy link

cwkhang commented Jan 10, 2018

Bug Information

Connect to router without Internet - return false (which is correct)
The same router now with Internet - still return false
I will have to turn off Wifi and turn on again - return true

Version Number of Plugin: 3.0.3
Device Tested On: Honor 6X (Android 7.0)
Simulator Tested On: Android 7.1
Version of VS: 2017 v15.5.2
Version of Xamarin: 8.1.0
Versions of other things you are using:

Steps to reproduce the Behavior

Turn on Router - connecting to Internet
Phone already connected to Router - return false
Router now with Internet
CrossConnectivity.Current.IsConnected still return false

Expected Behavior

CrossConnectivity.Current.IsConnected should return true once Router with Internet

Actual Behavior

Return false - even there is Internet already

Code snippet

public bool DoIHaveInternet()
        {
            if (!CrossConnectivity.IsSupported)
                return true;

            return CrossConnectivity.Current.IsConnected;
        }

Screenshots

@jamesmontemagno
Copy link
Owner

Since this is very specific to your setup you will need to debug it yourself and see why it is failing:
https://github.com/jamesmontemagno/ConnectivityPlugin/blob/master/src/Connectivity.Plugin.Android/ConnectivityImplementation.cs

@jamesmontemagno
Copy link
Owner

Most likely it is your device reporting back the wrong value and not much I can do, or you need to give it more time.

@cwkhang
Copy link
Author

cwkhang commented Jan 12, 2018

Yes, it is only my device that reporting back wrong value and I waited for one hour it still give me wrong value. I tested with another phone, it is working fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants