connectivity

How can I determine whether I am connected to WiFi or a mobile network in Windows Phone 8.1 (Universal app)?

為{幸葍}努か 提交于 2019-11-29 08:03:10
I am working with a Windows Universal app (shared backend between Windows 8.1 and Windows Phone 8.1, not Silverlight). The app connects to Azure with Azure Mobile Services. In the settings for the app I would like to have an option for synchronisation to only occur over a WiFi network. How can I determine if the phone is connected to WiFi or a mobile network? Although from my research I have found ways to do this with older versions of Windows Phone and with Silverlight, it seems I can only determine if the device is connected to the internet in a Windows Universal app. I believe you can

Detecting limited network connectivity in Android?

本秂侑毒 提交于 2019-11-29 02:30:18
There are a number of questions regarding how to detect network connectivity in Android. https://stackoverflow.com/a/4239019/90236 provides a very detailed answer and https://stackoverflow.com/a/8548926/90236 shows methods to identify the type of network to which one is connected. We detect network connectivity using code similar to those answers like: private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); return

Android 5.0 Lollipop and 4.4 KitKat ignores my WiFi network, enableNetwork() is useless

荒凉一梦 提交于 2019-11-28 22:27:42
问题 My app connect directly to a hardware device that act as an access point (with no access to internet). I can't connect because Android 5.0 automaticcaly switch to a valid internet connection, so if I have data connection (3G, 4G, ...) or a pre-configured network I can't connect to my device because it ignores the WiFi. So how can I force Android to use the network I activated programatically? I'm simply using: wifiManager.enableNetwork(id, true)) where id is the network of my device I want to

How to connect to outside world from amazon vpc?

℡╲_俬逩灬. 提交于 2019-11-28 13:27:59
问题 I have amazon VPC set through wizard as "public only network", so all my instances are in public subnet. Instances within VPC that have Elastic IP assigned connect to internet without any troubles. But instances without elastic IP can't connect anywhere. Internet gateway is present. Route table in aws console looks like Destination Target 10.0.0.0/16 local 0.0.0.0/0 igw-nnnnn and route from inside instance shows Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10

How to protect ZeroMQ Request Reply pattern against potential drops of messages?

扶醉桌前 提交于 2019-11-28 04:19:48
问题 I'm trying to implement a ZeroMQ pattern on the TCP layer between a c# application and distributed python servers. I've gotten a version working with the request-reply REQ/REP pattern and it seems relatively stable when testing on localhost . However, in testing, I've debugged a few situations, where I accidently send multiple requests before receiving a reply which apparently is not acceptable. In practice the network will likely have lots of dropped packets and I suspect that I'll be

Why does ping works on some devices and not others?

蹲街弑〆低调 提交于 2019-11-27 23:09:55
I have the following code in my app... Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec("/system/bin/ping -c 1 8.8.8.8"); return process.waitFor(); ... and I'm seeing that it works (returns 0) on some devices (e.g. Motorola G) but doesn't work (returns 2) on other devices (e.g. Galaxy S3). I've checked the Galaxy S3 device and it definitely has a "/system/bin/ping" file and of course I've made sure that it is indeed connected to the internet. Anyone have any ideas why the command might not work on some devices... and what I can do to get it to work? JTY The way ping is

How to check for unrestricted Internet access? (captive portal detection)

浪尽此生 提交于 2019-11-27 17:15:29
I need to reliably detect if a device has full internet access, i.e. that the user is not confined to a captive portal (also called walled garden ), i.e. a limited subnet which forces users to submit their credentials on a form in order to get full access. My app is automating the authentication process, and therefore it is important to know that full internet access is not available before starting the logon activity. The question is not about how to check that the network interface is up and in a connected state. It is about making sure the device has unrestricted internet access as opposed

Detecting limited network connectivity in Android?

笑着哭i 提交于 2019-11-27 17:01:10
问题 There are a number of questions regarding how to detect network connectivity in Android. https://stackoverflow.com/a/4239019/90236 provides a very detailed answer and https://stackoverflow.com/a/8548926/90236 shows methods to identify the type of network to which one is connected. We detect network connectivity using code similar to those answers like: private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY

Checking the Networking Connectivity using BroadcastReceiver in Android

旧时模样 提交于 2019-11-27 12:15:39
I am using the BroadcastReceiver to check the network connectivity while my app is running.I have binded the BroadcastReceiver with the Activity inorder to bring few controls like AlertDialog while the connectivity goes down. but now i don't want to restrict this receiver to a particular activity instead i want to make this to be applied for my whole app(All Activities). So what way should i have to proceed to get that done... This is the code that i have used.Please let me know whether my code reaches the standard and please correct me if have gone somewhere wrong. package com.xx.mobile;

How to find connected components in Matlab?

有些话、适合烂在心里 提交于 2019-11-27 09:09:14
array A = 2 3 2 5 4 8 5 6 7 8 I'd like to get the result as 'conidx = [2 3 5 6] and [4 7 8]'. One of the values of [2 3] exists in the 2nd row, One of the values of [2 5] exists in the 4th row, so [2 3], [2 5] and [5 6] are connected, finally I can get the connected indices as [2 3 5 6]. Otherwise, one of the values of [4 8] exists in the 5th row, so [4 8] and [7 8] are connected, finally I can get the connected indices as [4 7 8]. [3]<-->[2]<-->[5]<-->[6] and [4]<-->[8]<-->[7] build a graph and use graphconncomp G = sparse( A(:,1), A(:,2), 1, max(A(:)), max(A(:)) ); G = G + G.'; %' make graph