4

我使用 mvvmcross 开发针对 WPF、IOS 和 android 平台的应用程序。

如何获取网络状态和全局网络信息?例如:IP 地址、网络接口(以太网、Wifi、3g、...)

谢谢

4

1 回答 1

4

For mvvmcross v3, there is a Network plugin which provides information on network connectivity - https://github.com/slodge/MvvmCross/tree/v3/Plugins/Cirrious/Network

However, this is only implemented for iOS/Touch currently - it's there just in order to satisfy Apple's Reachability requirements.

In order to provide this across multiple platforms, you will need to add and implement your own interfaces - either extending this plugin, creating a new plugin or just using IoC injection from the UI projects.

I'm not aware of anyone who has done this already, but I'd love to see this contributed back to open source.

于 2013-04-11T09:17:14.030 回答