How to identify internet connection type and it's current speed [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
开发者_如何学PythonClosed 4 years ago.
Improve this questionHi I am testing my application for various types of internet connections with my device. I want my application send an internet request only if WI-FI is available and not in other cases like GPS ,WAP, 3G, etc....
Please also provide some information about how to check the current speed of that particular connection.
Thanks in advance
Use Apple's Reachability class to check for Wifi or WAN. Use this example and code: http://developer.apple.com/library/ios/#samplecode/Reachability/index.html
Checking the speed is more difficult, you would need to measure it by your own I think, maybe the best way is to ping and measure the response latency.
精彩评论