开发者

Finding the type of mobile connection in iOS

开发者 https://www.devze.com 2023-03-12 03:33 出处:网络
I am wondering if there is a way to find out the specific type of cellular/mobile connection in iOS. I need to know whether the user is on 3G/EDGE/GPRS so that I can store this information. I have loo

I am wondering if there is a way to find out the specific type of cellular/mobile connection in iOS. I need to know whether the user is on 3G/EDGE/GPRS so that I can store this information. I have looked into using the Reachability package but this seems to only differentiate between Wifi/WWAN connections and I need 开发者_开发百科to know the specifics of the WWAN connection. Also, if anybody knows how to do this in Android also it would be greatly appreciated.

Thanks, Chris.


Apple iOS

Have a look at this question, it seems to be a duplicate...

And as I wrote in the comments, it seems that's not possible without using private API.

Android

Should be possible using ConnectivityManager.getActiveNetworkInfo(). By the way this and that question seem highly related.

EDIT: deleted my old post which didn't really answer the question :-/

0

精彩评论

暂无评论...
验证码 换一张
取 消