plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[connectivity_plus] How to check for metered connection

Open PeterNjeim opened this issue 4 years ago • 15 comments

Is there a way to check for a metered connection (not simply wifi vs. cellular). Android and Windows differentiate between metered and unmetered connections, and it is user-changeable. I'm unsure if GNU/Linux, macOS, iOS, and Web do so though.

PeterNjeim avatar Nov 14 '21 23:11 PeterNjeim

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar May 31 '22 15:05 github-actions[bot]

Still an issue, not sure why an issue would be closed due to inactivity. Issues don't magically become resolved if there's inactivity. This bot should mark the issue as stale and leave it at that, not close the issue itself. Issues should never be closed unless they are resolved. Resolved could either mean fixed, added, or not planned.

PeterNjeim avatar May 31 '22 15:05 PeterNjeim

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Aug 30 '22 00:08 github-actions[bot]

Just to clarify, I believe that iOS's NWPathMonitor only provides an isExpensive field, but any Cellular or Mobile Hotspot network is considered expensive. It's not like on Android devices where the user can specifically mark their connection as metered and set a data usage limit.

https://developer.apple.com/documentation/network/nwpath/2998722-isexpensive

shaynekellyii avatar Oct 03 '22 00:10 shaynekellyii

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Jan 01 '23 00:01 github-actions[bot]

Is it possible for a wifi network to be considered expensive by an iOS device (without user intervention)? Regardless, even if that's all iOS gives us, we could still use it in this plugin. That means Windows, Android, iOS/iPadOS, and macOS are supported. NetworkManager supports it (more info). So that means most Linux distributions are covered.

I'm just now leaving the project that was working on the app that wanted this feature, so I don't personally care about this issue anymore. But it would still be nice to support detecting metered connections for future projects. Stale bot, though, will probably close this sometime in the future before it comes to fruition lol

PeterNjeim avatar Jan 11 '23 05:01 PeterNjeim

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Apr 13 '23 00:04 github-actions[bot]

I'd also love to see this feature being implemented :D

Myzel394 avatar Jun 08 '23 10:06 Myzel394

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Sep 07 '23 00:09 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Dec 07 '23 00:12 github-actions[bot]

still wanted

Myzel394 avatar Dec 07 '23 03:12 Myzel394

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Mar 08 '24 00:03 github-actions[bot]

I think stale bot was closing it because the ticket was a "question" not a "feature request", with the correct labels it should leave it be.

I also think it is an interesting feature to have, could be that there is a bit of overlapping between connectivity_plus and network_info_plus with this feature.

miquelbeltran avatar Mar 08 '24 07:03 miquelbeltran

Hey miquelbeltran,

~This is second issue/limitation in the package (after https://github.com/fluttercommunity/plus_plugins/issues/1472). The potential solution is trivial, but that would require us to either expose another method or make a breaking change. Personally, I would vote for introducing a breaking change.~

~We can return connection information in the following format~ ~class ConnectivityStatus {~ ~final ConnectivityResultType type;~
~/ null value indicates unknown status, helpful when underlying platform doesn't expose this.~ ~final bool? isVpn;~ ~final bool? isMetered;~ ~}~


Edit: While updating our fork, just noticed that we are now returning list of ConnectivityResult. :)

ua741 avatar Mar 15 '24 21:03 ua741

Hmm

cjmeyer-polymorph avatar Jun 06 '24 07:06 cjmeyer-polymorph