Skip to content

Maui Android app not reading the WiFi Metered information correctly in .NET 9 #30794

@mirceamuresanse

Description

@mirceamuresanse

Description

I set the Android tablet (Samsung Galaxy S21) on not metered
I use the following 2 ways to get the metered connection but both are returning true, as in the device is on metered connection:

  1. call networkCapabilities.HasCapability(NetCapability.NotMetered) => returns false (expected true)
  2. call connectivityManager.IsActiveNetworkMetered => returns true (expected false)

Steps to Reproduce

Check the link to my repo
Create a new .NET Maui app using .NET 9
Add a service to get the Metered connection information
Set the Android tablet WiFi to use a non metered connection
Deploy to the tablet
There are 2 method I tried, both returning wrong information
Expected to show that is non metered

Link to public reproduction project repository

https://github.com/mirceamuresanse/CheckMeteredConnection.git

Version with bug

9.0.90 SR9

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

.NET 8 (Please specify exact version)

Affected platforms

Android

Affected platform versions

15

Did you find any workaround?

No workaround yet

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-essentialsEssentials: Device, Display, Connectivity, Secure Storage, Sensors, App Infoplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions