3g

Detect 3G or Wifi Network restoration

☆樱花仙子☆ 提交于 2019-11-28 09:22:10
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 Zelimir 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 context, Intent intent) { String action = intent.getAction(); if (!action.equals(ConnectivityManager

My App works over WiFi. But not over 3G in android? Any Guesses?

会有一股神秘感。 提交于 2019-11-28 09:20:00
问题 I have developed an App that target version is 4 (Android 1.6) upto 7 (Android 2.1). I tested this app on the dev phone 2 (Google-Io-Device 1.6 version). I am doing some xml parsing stuff through Internet. i set the <uses-permission> on my Manifest. it works fine in WI-FI Network. But its not working in the Motorola Droid 2.1 with 3G Network. Is there any more specific stuff to do for 3G network? Any Idea? Thanks in advance. Edit: My App works over WiFi Network. But not over 3G Network. Any

WebSockets over a 3G connection

泪湿孤枕 提交于 2019-11-28 03:34:20
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 success getting them to work like that? I've tried a number of different methods and the all seem to

How to handle WiFi to Mobile network switch programatically?

若如初见. 提交于 2019-11-27 22:44:11
问题 Right now, I am having application which works with WiFi, but while I am going to mobile providers network my application does not working. I have maintained one background service which checks for network, but im not getting how to handle network switch WiFi to Mobile and Mobile to WiFi? I am not getting how to handle WiFi to mobile network switch because already WiFi is enabled and I am not in WiFi coverage area; in this situation I want to get switched to mobile network automatically and

Force Android to use 3G when on local area wifi without net access

为君一笑 提交于 2019-11-27 20:37:23
问题 I have a wifi LAN setup which does not have internet access. Just various other local wifi devices connected to it. The DHCP is configured to not return a gateway or dns server. Only an IP and netmask. When I connect my android to this wifi AP it connects fine, but all internet connectivity on the phone stops working. I would expect that since the wifi has no gateway setting that android should realize the internet can't go through that connection and should instead be routed through the 3G

UPnP NAT Traversal for 3G/4G Wireless Data Connection on Android

本小妞迷上赌 提交于 2019-11-27 14:16:09
问题 Is there any way to use UPnP for NAT traversal on Android with a 3G/4G connection, and if so, is it carrier dependent? 回答1: No, for the time being thee is no way to do that, for the simple reason that the mobile carriers don't use residential-class NATs - what they have is "Carrier-Grade NATs" CGN, see here http://en.wikipedia.org/wiki/Carrier-grade_NAT, and these devices have very different port allocation and management mechanisms from the residential gateways. See the Carrier-Grade NAT

Android : Check 3G or Wifi network is ON or Available or not on android Device

强颜欢笑 提交于 2019-11-27 11:51:14
How to check that network is available or not on android device programmatically, which throws a message or toast message when we are trying to connect with a network such as Wifi & 3G. TO check whether network i.e 3G or WiFi is available or not we can use below methods to verify before starting our activities. ConnectivityManager manager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); //For 3G check boolean is3g = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) .isConnectedOrConnecting(); //For WiFi Check boolean isWifi = manager.getNetworkInfo(ConnectivityManager.TYPE

android statistic 3g traffic for each APP, how?

被刻印的时光 ゝ 提交于 2019-11-27 11:32:51
问题 For statistic network traffic per APP, what I'm using now is Android TrafficStats That I can get result like following : Youtube 50.30 MBytes Facebook 21.39 MBytes Google Play 103.38 MBytes (and more...) As I know, the "Android Trafficstats" just a native pointer to a c file. (maybe an .so ?) But it mixed Wifi & 3g traffic, is there any way to only get non-WiFi traffic statistic ? 回答1: Evening all, I got some way to do that... First I have to create a class which extends BroadcasrReceiver,

Reachability airplane mode (3G) vs. Wifi

隐身守侯 提交于 2019-11-27 08:39:52
问题 I know the Reachability code will provide if the phone has access to Wifi or 3G network. However, if the phone has 3G on and Wifi, the Reachability code defaults to saying the phone has Wifi on and I can't detect if 3G network is enabled or not (airplane mode on or off). I need to find out specifically if 3G mode is on or off when Wifi is also on. Here is the code: Reachability *reachability = [Reachability reachabilityForInternetConnection]; [reachability startNotifier]; NetworkStatus status

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

最后都变了- 提交于 2019-11-27 08:16:55
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 this is a problem being introduced by my mobile operator in the UK (O2) which is known to modify some