Questions tagged [network-state]
26 questions
59
votes
8 answers
How do you check the internet connection in android?
I want to check the internet connectivity in each activity. If it is lost a message should be displayed.
Can any one guide me how to achieve this?

UMAR-MOBITSOLUTIONS
- 77,236
- 95
- 209
- 278
4
votes
1 answer
Network state with mvvmcross?
I use mvvmcross to develop application which target WPF, IOS and android platforms.
How can I get network state and globally network informations ?
Ex : IP address, network interface (Ethernet, Wifi, 3g, ...)
Thanks

sbou
- 213
- 2
- 12
3
votes
1 answer
launchd NetworkState when no network connection
Anyone familiar with launchd on Mac OS X, specifically the NetworkState (bool) key in KeepAlive section of a .plist file?
From the man pages, launchd should call an executable when there is no network connectivity on the Mac, when the plist is…

Eric Baker
- 357
- 4
- 14
3
votes
0 answers
getting crash while using NetInfo.isConnected in ios react native
I am trying to read the networkstatechange in react-native ios code as :…

Simranjit Singh
- 51
- 5
2
votes
2 answers
Internet check connection not working android.net.isConected()
This question is related to how-do-you-check-the-internet-connection-in-android.
@William solution heelps me a lot, but on limited connection it`s not working.
I have connected to a wireless modem, but this modem is not connected to the…

Elcio Arthur Cardoso
- 47
- 1
- 8
1
vote
1 answer
Upload from offline HTML5 app when network available
Wow, my problem seems like it must be so common that I must just be missing something really obvious but here goes:
Is there any way to trigger/schedule a dormant offline HTML5 app to run either:
when network comes available,
or regularly.
I want…

user-10884042
- 31
- 1
- 5
1
vote
1 answer
Broadcast Receiver to detect change in mobile network
I am looking for a way to make my Android app
do something every time there is a change in mobile network,
i.e. going from 2g to 3g, 4g to wifi etc.
All I can find for broadcast receivers are the ones that execute on loss or gain of network…

Frank Bozzo
- 15,033
- 6
- 25
- 29
1
vote
2 answers
Internet Connectivity Change Broadcast Not Happening
For some reason, my network change receiver isn't working and broadcasting a CONNECTIVITY_CHANGE to my NetworkStateReceiver class in my Android application. I've checked to see if it is simply a problem with my dialog box, but the Log.d's that are…

f3d0r
- 541
- 3
- 12
- 27
1
vote
2 answers
Instabug, is it possible to deactivate the shake for feedback, if there is no internet access?
I have a networkStateReceiver, that checks if I have internet or not.
If I do, I reinitiate instabug, if not, I want to deactivate. How can I do that?
I tried just setting it as null, but it doesn't work.
if(haveConnectedMobile ||…

rosu alin
- 5,674
- 11
- 69
- 150
1
vote
1 answer
Android NetworkState issue, returning twice
I have the code below, which is intended to check if the network being used is Cell or WiFi. If WiFi then return the string WiFi and if cell return the string Cell. The code I have is:
private String checkNetworkState() {
ConnectivityManager…

Dan
- 2,304
- 6
- 42
- 69
1
vote
1 answer
Reachability and reachabilityWithHostName
I am using iOS 7.1 (XCode 5.1) and recently downloaded Tony Million's Reachability library and later Apples example code. When testing, both successfully detected when i turned WiFi off, however upon reconnection the hostname remained…

Alex
- 68
- 6
1
vote
1 answer
Android Network connection status
I'm trying build this network connection using BroadcastReceiver. When connection doesnt exist it will show an alert dialog box telling users to retry the connection. I couldnt get this part to work. It says "The constructor…

Android Novice
- 536
- 3
- 14
- 33
1
vote
5 answers
how to display the alert box if there is no internet connection using Phonegap?
function checkConnection() {
var networkState = navigator.network.connection.type;
var states = {};
states[Connection.UNKNOWN] = 'Unknown connection';
…

Raj
- 193
- 1
- 3
- 13
0
votes
1 answer
Listening to network events by using registerNetworkCallback with PendingIntent
What I want: when internet connection status changes from OFF to ON or vice-versa - I want to know about that immediately to stop/start a service even if the application isn't active. As pending intents may outlive the calling application, I think…

Alexey
- 1,198
- 1
- 15
- 35
0
votes
1 answer
Remotely get power state of a pc (like LogMeIn)
on a device (iphone, mac, pc, etc.) i want to know if a pc (on the same lan and running windows) is
1) "on" (meaning powered on) and lan-connected with my device
2) on but the network cable is unplugged or the network card is disabled
3)…