check internet connection
#1
hey
is there any way to check "either internet is connected or not" xbmc.
i want this check for my addon development
basically i want something like this

if is_internet_connected:
#do this
else
#do that

whereas is_internet_connected is var which shows either internet is connected or not.

how to get this?
any help will be appreciated
thanks
Reply
#2
Why not:
Code:
import urllib2
try:
    response=urllib2.urlopen('http://8.8.8.8',timeout=1)
    internets =True
except urllib2.URLError:
    internets = False
Reply
#3
Or you could try it with infolabels

Code:
import xbmc
is_connected = xbmc.getInfoLabel('System.InternetState')
Reply

Logout Mark Read Team Forum Stats Members Help
check internet connection0