Questions tagged [connectivity]

Anything related to connectivity, i.e. the ability of systems to communicate with remote systems using some form of communication channel. Often used for questions on network connectivity.

Anything related to connectivity, i.e. the ability of systems to communicate with remote systems using some form of communication channel. Often used for questions on network connectivity.

668 questions
288
votes
22 answers

Detect the Internet connection is offline?

How to detect the Internet connection is offline in JavaScript?
Daniel Silveira
  • 37,165
  • 32
  • 96
  • 120
246
votes
27 answers

Simulate low network connectivity for Android

I would like to test my application for cases of low network connectivity. Except standing in the elevator, what is the best way to do this? I've tried wrapping my phone in an aluminum foil, but it didn't help much. I need to test it on a real…
Maggie
  • 7,253
  • 6
  • 39
  • 65
188
votes
14 answers

Detect network connection type on Android

How do you detect the network connection type on Android? Is it through ConnectivityManager.getActiveNetworkInfo().getType(), and is the answer limited to Wifi and mobile?
hpique
  • 112,774
  • 126
  • 328
  • 461
76
votes
10 answers

Android: Internet connectivity change listener

I already have this code which listens to connectivity change - public class NetworkStateReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { Log.d("app","Network connectivity change"); …
Confuse
  • 4,968
  • 6
  • 31
  • 57
71
votes
10 answers

Checking host availability by using ping in bash scripts

I want to write a script, that would keep checking if any of the devices in network, that should be online all day long, are really online. I tried to use ping, but if [ "`ping -c 1 some_ip_here`" ] then echo 1 else echo 0 fi gives 1 no matter…
burtek
  • 1,932
  • 4
  • 26
  • 31
59
votes
4 answers

Android event for internet connectivity state change

I am making an app where a user is uploading information and files to my server on a somewhat frequent basis. This is done in new threads through a dedicated uploader service. I know from this thread Detect whether there is an Internet connection…
akhalsa
  • 2,281
  • 3
  • 24
  • 43
59
votes
5 answers

Detect airplane mode on iOS

How can I detect if the phone is in airplane mode? (It's not enough to detect there is no internet connection, I have to be able to distinguish these 2 cases)
Caner
  • 49,709
  • 33
  • 153
  • 169
53
votes
11 answers

How to connect to outside world from amazon vpc?

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…
46
votes
9 answers

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/dbname

I have this Java program: MySQLConnectExample.java import java.sql.*; import java.util.Properties; public class MySQLConnectExample { public static void main(String[] args) { Connection conn1 = null; Connection conn2 = null; …
user3416261
  • 477
  • 1
  • 4
  • 7
37
votes
7 answers

Android: How to check if the server is available?

I am developing an application which connects to the server. By now the login and data transmission works fine if theserver is available. The problem arises when the server is unavailable. In this case the method sends a login request and waits for…
Niko Gamulin
  • 63,517
  • 91
  • 213
  • 274
35
votes
6 answers

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

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…
ccpizza
  • 21,405
  • 10
  • 121
  • 123
25
votes
3 answers

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

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…
Seraphim's
  • 11,736
  • 17
  • 80
  • 126
24
votes
2 answers

How to avoid "The job exceeded the maximum time limit for jobs, and has been terminated." when accessing mvnsearch.org on Travis CI?

Since approx. 72h I'm getting The job exceeded the maximum time limit for jobs, and has been terminated. on TravisCI which seems to be related requesting artifacts from mvnsearch.org, e.g.…
Karl Richter
  • 6,271
  • 17
  • 57
  • 120
19
votes
0 answers

Watch Connectivity throwing NSFileReadNoSuchFileError -> ENOENT

I am using watch connectivity in my app quite successfully, but sometimes when I start the debugging session all I get in that session is a stream of errors like this one: [WC] -[WCFileStorage enumerateIncomingUserInfosWithBlock:] could not load…
Miroslav Kuťák
  • 1,755
  • 1
  • 15
  • 24
19
votes
3 answers

unfortunately app is getting stopped while checking for network

I am using the following code to check for the internet connection through out my app. public class ConnectionChangeReceiver extends BroadcastReceiver { @Override public void onReceive( Context context, Intent intent ) { …
Beginner
  • 1,384
  • 2
  • 20
  • 39
1
2 3
44 45