Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Connectivity plugin return Internet even "Wifi" and "Mobile data" is not on in Android 13 #2054

Open
Mushtaq123 opened this issue Nov 4, 2022 · 0 comments

Comments

@Mushtaq123
Copy link

Bug report best practices: Submitting Issues

Description

Steps to Reproduce

if (Connectivity.ConnectionProfiles.Contains(ConnectionProfile.WiFi)
	|| Connectivity.ConnectionProfiles.Contains(ConnectionProfile.Cellular)
	|| Connectivity.ConnectionProfiles.Contains(ConnectionProfile.Ethernet))
{
	hasConnection = true;
}
Debug.WriteLine(hasConnection);
Debug.WriteLine(Connectivity.NetworkAccess); 
if (!Connectivity.NetworkAccess.Equals(NetworkAccess.None) && !Connectivity.NetworkAccess.Equals(NetworkAccess.Unknown))
{
	return true;
}
return false;

Expected Behavior

Should return false based on the condition and NetworkAccess shouldn't be "Internet"

Actual Behavior

returns true and NetworkAccess returns "Internet"

Basic Information

Target & Compile Version: 11.0 (Api Level 30-R)
Minumum: 5.0 (Api Level 21)
Latest Xamarin.Forms: 5.0.0.2515
Latest Xamarin.Essentials: 1.7.3

@Mushtaq123 Mushtaq123 changed the title Connectivity plugin return Internet even "Wifi" and "Mobile data" is not on Android 13 Connectivity plugin return Internet even "Wifi" and "Mobile data" is not on in Android 13 Nov 4, 2022
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

1 participant