Questions tagged [internet-connection]

Anything related to the hardware, software tools and techniques needed to establish and manage an Internet connection.

Anything related to the hardware, software tools and techniques needed to establish and manage an Internet connection.

463 questions
744
votes
6 answers

Detect whether there is an Internet connection available on Android

Possible Duplicate: How to check internet access on Android? InetAddress never timeouts I need to detect whether the Android device is connected to the Internet. The NetworkInfo class provides a non-static method isAvailable() that sounds…
Dan
  • 15,948
  • 20
  • 63
  • 92
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
291
votes
27 answers

What is the best way to check for Internet connectivity using .NET?

What is the fastest and most efficient way to check for Internet connectivity in .NET?
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
243
votes
28 answers

Check whether there is an Internet connection available on Flutter app

I have a network call to be executed. But before doing that I need to check whether the device have internet connectivity. This is what i have done so far: var connectivityResult = new Connectivity().checkConnectivity();// User defined class …
Rissmon Suresh
  • 13,173
  • 5
  • 29
  • 38
221
votes
9 answers

Check if Internet Connection Exists with jQuery?

How do you check if there is an internet connection using jQuery? That way I could have some conditionals saying "use the google cached version of JQuery during production, use either that or a local version during development, depending on the…
Lance
  • 75,200
  • 93
  • 289
  • 503
151
votes
16 answers

Easiest way to detect Internet connection on iOS?

I know this question will appear to be a dupe of many others, however, I don't feel the simple case is well explained here. Coming from an Android and BlackBerry background, making requests through HTTPUrlConnection instantly fail if there is no…
RealCasually
  • 3,593
  • 3
  • 27
  • 34
149
votes
16 answers

Detect if Android device has Internet connection

I need to tell if my device has Internet connection or not. I found many answers like: private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager)…
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
67
votes
12 answers

How do I disable the Internet connection in Android Emulator?

I am trying to check Internet connectivity on Android using the following method. I have a Wi-Fi connection. private boolean checkInternetConnection() { ConnectivityManager cm = (ConnectivityManager)…
Rebooting
  • 2,762
  • 11
  • 47
  • 70
53
votes
31 answers

How to check currently internet connection is available or not in android

I want to execute my application offline also, so I need to check if currently an internet connection is available or not. Can anybody tell me how to check if internet is available or not in android? Give sample code. I tried with the code below and…
mohan
  • 13,035
  • 29
  • 108
  • 178
53
votes
14 answers

Determine in php script if connected to internet?

How can I check if I'm connected to the internet from my PHP script which is running on my dev machine? I run the script to download a set of files (which may or may not exist) using wget. If I try the download without being connected, wget proceeds…
Steve
  • 1,857
  • 5
  • 32
  • 45
53
votes
12 answers

Check internet connection (iOS 10)

For iOS 9 I was using Reachability public class to check wether the device is connected to the internet or not. I converted my Swift 2 code to Swift 3, and the Reachability doesn't work anymore. Can someone tell me how to check the internet…
LOLXDXPLOL
  • 611
  • 1
  • 6
  • 9
41
votes
4 answers

Simulating a bad internet connection

I'm developing an embedded device which has access to the internet through LAN. I'm in the testing phase now, and I would like to test how the device performs when the connection to the internet is poor. Currently, the device is connected to a…
stdcall
  • 27,613
  • 18
  • 81
  • 125
35
votes
7 answers

Detect internet Connection using Java

Possible Duplicate: How to check if internet connection is present in java? I want to see if anyone has an easy way of detecting if there is an internet connection when using Java. The current app used the "InternetGetConnectedState" method in…
Ken
29
votes
7 answers

How to detect working internet connection in C#?

I have a C# code that basically uploads a file via FTP protocol (using FtpWebRequest). I'd like, however, to first determine whether there is a working internet connection before trying to upload the file (since, if there isn't there is no point in…
Detariael
  • 4,152
  • 4
  • 19
  • 10
28
votes
2 answers

Battery-saver + phone-call-intent => no Internet?

Note: as it turns out, the original question was incorrect in its assumptions. See more details on its edits at the bottom. It's now about the battery-saver, and not battery-saver&doze-mode. It's also not about Service&BroadcastReceiver, but just…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
2 3
30 31