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.

720 questions
360
votes
23 answers

Detect if the internet connection is offline?

How can I detect if the internet connection is offline in JavaScript?
Daniel Silveira
  • 41,125
  • 36
  • 100
  • 121
280
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,823
  • 7
  • 45
  • 66
195
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
  • 119,096
  • 131
  • 338
  • 476
100
votes
13 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
  • 5,646
  • 7
  • 36
  • 58
96
votes
11 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
  • 2,576
  • 7
  • 29
  • 37
61
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,303
  • 3
  • 25
  • 43
54
votes
10 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…
53
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
  • 547
  • 1
  • 4
  • 8
39
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
  • 66,025
  • 95
  • 221
  • 286
37
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
  • 28,968
  • 18
  • 162
  • 169
26
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,875
  • 1
  • 18
  • 24
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
  • 12,559
  • 20
  • 88
  • 129
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.…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
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,414
  • 2
  • 21
  • 41
17
votes
5 answers

ConnectivityManager leaking, not sure how to resolve

So, I have this method that let's me know if the user has an active internet connection. It works well. However, leak canary has identified a memory leak associated with the connectivityManager. I am presently not closing the connectivityManager…
seekingStillness
  • 4,833
  • 5
  • 38
  • 68
1
2 3
47 48