[英]Network state with mvvmcross?
I use mvvmcross to develop application which target WPF, IOS and android platforms. 我使用mvvmcross开发针对WPF,IOS和Android平台的应用程序。
How can I get network state and globally network informations ? 如何获取网络状态和全局网络信息? Ex : IP address, network interface (Ethernet, Wifi, 3g, ...)
例如:IP地址,网络接口(以太网,Wifi,3g,......)
Thanks 谢谢
For mvvmcross v3, there is a Network plugin which provides information on network connectivity - https://github.com/slodge/MvvmCross/tree/v3/Plugins/Cirrious/Network 对于mvvmcross v3,有一个网络插件,提供有关网络连接的信息 - 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. 但是,这仅适用于iOS / Touch目前 - 它只是为了满足Apple的
Reachability
要求。
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. 为了在多个平台上提供这一功能,您需要添加和实现自己的接口 - 扩展此插件,创建新插件或仅使用UI项目中的IoC注入。
I'm not aware of anyone who has done this already, but I'd love to see this contributed back to open source. 我不知道有谁已经这样做了,但我很想看到这回馈给开源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.