3g

Checking cellular network type in iOS

↘锁芯ラ 提交于 2019-11-27 06:30:12
问题 I am working on an iOS app, and want to determine which type of cellular connection the device has. I'm most interested in the kind of cellular network my device is using: 2G or 3G, or other. However, the Reachability.h only provides checking for wifi or 3G. How can I check for 2G, 3G, etc? 回答1: 2G / 3G cannot be distinguished via Reachability.h or any other third party libraries, as iPhone only provides network type information ( WWAN , WiFi , no Network ) to API. However, if you are able to

Detect 3G or Wifi Network restoration

喜你入骨 提交于 2019-11-27 02:51:13
问题 Is it possible to implement a PhoneStateListener(or any other mechanism) to detect when either the 3G or Wifi network connection is restored ? I see both LISTEN_DATA_CONNECTION_STATE and LISTEN_DATA_ACTIVITY say (cellular) in the API's summary. Does it mean 3G only ? Thanks 回答1: Better approach would be to use android.net.ConnectivityManager class. Register the receiver and monitor broadcasts. private class ConnectionMonitor extends BroadcastReceiver { @Override public void onReceive(Context

WebSockets over a 3G connection

 ̄綄美尐妖づ 提交于 2019-11-27 00:06:38
问题 I've been playing with Socket.io, node.js and WebSockets, all of which I can get working fine over a wifi connection. However, when I test out a WebSocket-enabled app over a 3G connection (on my iPhone, for example) then it seems like falling back to long polling is the only workable solution. With Socket.io the connection fails with "WebSocket connection invalid or Origin not verified" before falling back to long polling. I don't know if WebSockets are meant to work over 3G - has anyone had

How to determine if network type is 2G, 3G or 4G

守給你的承諾、 提交于 2019-11-26 14:13:16
I have an indicator on my application to display the network type (2G or 3G or 4G) but after getting the network type, how do I know what speed category it should be in? I know how to detect the network type: private TelephonyManager telephonyManager; telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); CurrentNetworkType = telephonyManager.getNetworkType(); Given the possible return values: // public static final int NETWORK_TYPE_1xRTT // Since: API Level 4 // Current network is 1xRTT // Constant Value: 7 (0x00000007) // // public static final int NETWORK_TYPE

Web site exhibits JavaScript error on iPad / iPhone under 3G but not under WiFi

一笑奈何 提交于 2019-11-26 14:06:21
问题 Connecting to http://www.manage-us.com on an iPad under 3G [used to] result in a JavaScript error which can be seen if the developer console has been enabled. If the same page is accessed using the same iPad under a WiFi connection no error is displayed. [The error has now gone because I applied the fix below!]. Why is this? I've tried simulating low bandwidth (using dummynet) on Safari on Mac and on the iPad simulator on Mac. This does not reproduce the problem. I am currently suspecting

How can i turn off 3G/Data programmatically on Android?

牧云@^-^@ 提交于 2019-11-26 12:09:18
How can I turn off 3G/Data programmatically on Android? Not Wifi, but 3G/Data. There is no official way to do this. However, it can be achieved unofficially with reflection. For Android 2.3 and above: private void setMobileDataEnabled(Context context, boolean enabled) { final ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); final Class conmanClass = Class.forName(conman.getClass().getName()); final Field iConnectivityManagerField = conmanClass.getDeclaredField("mService"); iConnectivityManagerField.setAccessible(true); final Object

Get CellID, MCC, MNC, LAC, and Network in iOS 5.1

假如想象 提交于 2019-11-26 06:20:58
问题 I need to retrieve CellID, MCC, MNC, LAC and Network (GSM, 3G) of the current Serving Cell Tower in iOS 5.1 (iPhone 4S). I know this information is available because I can see it in FieldTest Mode (accessible after calling ****3001#12345#****). I suppose it to be accessible via Private/Undocumented iOS Frameworks. In the question iphone, check values of cellId / Lac the author indicates I can get radio Informations cellId, Lac, MNC, MCC on iOS , but no information on how to do this is

iOS Detect 3G or WiFi

自闭症网瘾萝莉.ら 提交于 2019-11-26 01:46:36
问题 I am not sure if this is possible, but I have this scenario. I have a website displayed in my UIWebView which has the link set in a UISegmentedController. They website can detect if you are on wifi or on the 3g network. Now the segmented controller points to 2 different pages: 1 - An iPhone friendly login screen 2 - The home page, once you are logged in. Now here is the question: Can I program my application to detect whether it is to WIFI or 3G (I know you can do this), but then based on the

iOS Detect 3G or WiFi

安稳与你 提交于 2019-11-25 20:35:12
I am not sure if this is possible, but I have this scenario. I have a website displayed in my UIWebView which has the link set in a UISegmentedController. They website can detect if you are on wifi or on the 3g network. Now the segmented controller points to 2 different pages: 1 - An iPhone friendly login screen 2 - The home page, once you are logged in. Now here is the question: Can I program my application to detect whether it is to WIFI or 3G (I know you can do this), but then based on the answer go to segment 1 or 2 Kind of like this: if (iPhone device is on 3g) { Go to Segment 1; } else {