You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2024. It is now read-only.
Using Essentials connectivity to show connection status. When there is no connection, Android device shows Local or internet, but not NONE. When there is no connection Android shows LOCAL instead of NONE.. On IOS it works correctly, device shows NONE as expected.
Steps to Reproduce
In code behind put in simple code for testing and 2 labels in Xaml to display changes.
publicMainPage(){InitializeComponent();Connectivity.ConnectivityChanged+=Connectivity_ConnectivityChanged;}privatevoidConnectivity_ConnectivityChanged(objectsender,ConnectivityChangedEventArgse){LabelStatus.Text="NetworkAccess : "+e.NetworkAccess+"Profile: "+e.ConnectionProfiles;UpdateLabels();//throw new NotImplementedException();}privatevoidUpdateLabels(){varcurrent=Connectivity.NetworkAccess;if(current==NetworkAccess.Internet){LabelConnect.Text="Internet";}elseif(current==NetworkAccess.None){LabelConnect.Text="NONE";}elseif(current==NetworkAccess.Local){LabelConnect.Text="local";}}protectedoverridevoidOnAppearing(){UpdateLabels();}
In XAML just added to labels
<StackLayout>
<LabelText="Welcome to Xamarin.Forms!"x:Name="LabelStatus"></Label>
<LabelText="Current connection:"x:Name="LabelConnect"></Label>
</StackLayout>
Run app
Shows Wifi or Local correctly
Turn on airplane mode to disable wifi and cell
Expected Behavior
To display NONE (IOS displays NONE)
Actual Behavior
NetworkAccess : LocalProfile
Label update shows Local (current == NetworkAccess.Local)
Basic Information
Version with issue: Xamarin Essentials Version 1.0.0 /Xamarin Forms 3.1.0.697729
Last known good version: never tested, new.
IDE:
Platform Target Frameworks: Tried 8.0(oreo) and 9.0(P)
iOS:
Android: 8.1OREO
Android Support Library Version:
Nuget Packages:Xamarin Essentials Version 1.0.0 /Xamarin Forms 3.1.0.697729
Affected Devices: Android
Testing on Galaxy S9+ running Android 8.0.0
Bug report best practices: Submitting Issues
Description
Using Essentials connectivity to show connection status. When there is no connection, Android device shows Local or internet, but not NONE. When there is no connection Android shows LOCAL instead of NONE.. On IOS it works correctly, device shows NONE as expected.
Steps to Reproduce
In code behind put in simple code for testing and 2 labels in Xaml to display changes.
In XAML just added to labels
Expected Behavior
To display NONE (IOS displays NONE)
Actual Behavior
NetworkAccess : LocalProfile
Label update shows Local (current == NetworkAccess.Local)
Basic Information
Testing on Galaxy S9+ running Android 8.0.0