how to respond to internet off?

You must Login before you can answer or comment on any questions.

Do you test each time you use the internet if t is off? How can you do check this? How can you open an intent to turn on internet on android? can you have something similar on iOS?

— asked 11 months ago by Ryan popa
0 Comments

1 Answer

Yes and you can test using something like this:

if(Titanium.Network.networkType === Titanium.Network.NETWORK_NONE) {
    //React here...
}

— answered 11 months ago by David Bankier
answer permalink
1 Comment
  • You can do the above check as David suggested, before making a call to server and if it returns true, you can pop up an alert to user to indicate that network is none and select the appropriate network.

    we are following the same approach in our app.

    — commented 11 months ago by swaroopa aennam

Your Answer

Think you can help? Login to answer this question!