Closed blondie63 closed 4 months ago
Hi @blondie63, I tested the code against Android versions 10, 12, and 14 but got the actual wifi gateway IP address as expected. I'm not getting any wrong IP address you have mentioned. Please check again, and let us know if everything is not okay.
Thanks
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
Platform
Android 14
Plugin
network_info_plus
Version
4.1.0
Flutter SDK
3.16.5
Steps to reproduce
Run example project and take a look to gatewayIP returned The plugin return ip of dhcp host and not the network gateway ! You can see on plugin code: fun getGatewayIPAddress(): String? { return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { val linkAddresses = connectivityManager?.getLinkProperties(connectivityManager.activeNetwork) val dhcpServer = linkAddresses?.dhcpServerAddress?.hostAddress
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean