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.

438 questions
711
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,066
  • 19
  • 57
  • 88
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
255
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
  • 48,747
  • 74
  • 187
  • 247
220
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 Pollard
  • 66,757
  • 77
  • 237
  • 416
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,441
  • 3
  • 23
  • 32
144
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
  • 19,769
  • 35
  • 114
  • 174
52
votes
11 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)…
Chandeep
  • 2,366
  • 10
  • 44
  • 65
52
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
  • 601
  • 1
  • 6
  • 9
48
votes
21 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
  • 11,969
  • 29
  • 102
  • 172
47
votes
11 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,755
  • 5
  • 27
  • 44
39
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
  • 23,764
  • 14
  • 73
  • 118
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
  • 3,862
  • 4
  • 17
  • 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
  • 106,412
  • 122
  • 641
  • 1,128
21
votes
3 answers

Objective-C determine data network type of the iOS device

Im on an application that receive data from server, the problem is when user connect to cellular data (Not 3G or WIFI), it take ages to receive data. i had implemented this code from this Answer but im not sure if it is effective or not, sometimes…
Mutawe
  • 6,399
  • 3
  • 43
  • 88
1
2 3
29 30