Skip to content
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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant