connectivity

How can I connect directly to a mobile device over 3G?

末鹿安然 提交于 2019-12-07 12:55:00
问题 I'd like to be able to deploy a lightweight web server on my mobile device (android) but there are obviously NAT issues with respect to the mobile provider's network. Is there anyway I can make my device publicly available/addressable over the internet? 回答1: A Nokia research team did something similar to this and used a gateway, which was mapped to the public URL with DNS, to provide a means of always accessing the phone (which had an app to then send the HTTP message to the Mobile webserver)

partial wakelock for 3G in Android

你说的曾经没有我的故事 提交于 2019-12-06 19:17:32
I have a service that uploads file to a server. I acquire a wifilock on it but do I need a partial wakelock if the service is using 3G ? WakeLock is an Inefficient way of keeping the screen on. Instead use the WindowManager to do the magic. The following one line will suffice the WakeLock. The WakeLock Permission is not needed for this to work. Also this code is efficient than the WakeLock. getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON); You need not relase the WakeLock Manually. This code will allow the Android System to handle the Lock Automatically. When your application is in the

Determining if a graph is K-vertex-connected

泪湿孤枕 提交于 2019-12-06 16:03:00
I'm looking to come up with an polynomial time algorithm that takes input in the form of a graph, G, and an integer, K, and determines whether G is K-vertex connected. I'm thinking that this would likely utilize Depth First Search. I can see how it could be none with a none-polynomial solution, i.e. just deleting K random vertices, running DFS to check for connectivity, and then doing it again with a different group of vertices. A run time of ~O(n^K) is a little much though, and it is apparently possible to bring this down to polynomial time. Any idea what I'm missing here? I imagine it has

How to deploy an .appx into Windows Phone 8.1

北战南征 提交于 2019-12-06 13:17:55
I use the Microsoft.SmartDevice.Connectivity to connect to Windows Phone 8.1 OS with the instruction in this link: connect to windows phone 8 using console application Now I can connect to both Windows Phone 8.1 Emulator or Windows Phone 8.1 Device, and I can launch any application by using their ProductID. So now I would like to install my apps which I developed to these device by using this framework. I know that the XAP package for WP8.1 is an .appx file. To install 1 apps in this framework I use the InstallApplication() method like this: IRemoteApplication remoteApplication = iDevice

ReachabilityWithAddress error giving it an ip address

允我心安 提交于 2019-12-06 07:14:08
hey Im trying to see if I can connect to an IP address. My code atm: #import "ViewController.h" #import "SystemConfiguration/SystemConfiguration.h" @implementation ViewController struct sockaddr_in ; - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. Reachability *d = [Reachability reachabilityWithAddress:const struct sockaddr_in ???????]; NetworkStatus internetStatus = [d currentReachabilityStatus]; //NetworkStatus internetStatus = [d currentReachabilityStatus]; if ((internetStatus != ReachableViaWiFi) && (internetStatus!=

Retrofit + Rxjava takes long time to invoke onError when server connection failed

安稳与你 提交于 2019-12-06 02:33:03
问题 I'm using Retrofit + Rxjava to get a list of entities from server, by my design when the task fails, first it checks Internet connection and after that it checks the connection to the server in doOnError method of Observable . When Client is not connected to the Internet doOnError is invoked in a reasonable time and user get the error message but the problem is when Internet is connected and I get wrong port or domain (to check the server problem error) It takes a long time (about 1 min or

Check for internet connection in Flash?

落花浮王杯 提交于 2019-12-06 02:04:06
How do I check for an active internet connection in Flash using Actionscript 3? If you are using AIR, you can use the ServiceMonitor class. Otherwise you might want to consider rolling your own with a URLLoader coupled with a timer with an exponential backoff. to expand on martineno's answer about rolling your own using the URLLoader, read about the HTTPStatusEvent in the documentation. at the end of the document Adobe includes an example for checking for the existence of a file on a server, but the same could be applied to simply check for an internet connection. 来源: https://stackoverflow.com

iOS enterprise vpn connectivity

爷,独闯天下 提交于 2019-12-05 18:49:30
In an iOS application if you had to access corporate remote services, through VPN, what would be your pattern to ensure you have connectivity and inform the user if that's not the case: check that your network and VPN are working (by checking if some host like google.com and some private enterprise host are reachable) and if that's the case then call the remote service? or call directly the remote service, and if there is a network exception, then check if both a network host and an enterprise host are reachable? (to find-out what's going on and inform the user) or you would do it differently?

ConnectivityManager getActiveNetworkInfo() is always null even with data traffic active

喜你入骨 提交于 2019-12-05 03:33:06
i'm working on a android project and i had the need to check for internet connection. i searched the web and i found a solution here on stackoverflow. However, i'm having problems on checking the internet state. I already searched everywhere but i can't find any solution for my problem. Here is the manifest: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> Here is the code for checking if internet is connected: cm =

Unable to access Internet via WiFi from a Background service

↘锁芯ラ 提交于 2019-12-05 00:47:32
问题 I'll get straight onto some facts/figures I discovered pls help me if you've faced/solved a similar problem. I send back data every 5 minutes to a server unless the user manually toggles it Off with the help of a wakeful broadcast receiver through a intent service . Plus I get wifi locks before doing (I've tried this already without locks; doesnt work either) Now on devices sending back data from regular data networks (2G/3G/4G) this works fine but on those connected to a wifi network somehow