[mono-android] Check for internet connection fails on Vodafone 858

Petr Slováček pslovacek at newlink.cz
Mon Jun 25 13:10:38 UTC 2012


Hello everyone,

I'm using this piece of code to check if internet connection is available:

ConnectivityManager conMgr = (ConnectivityManager)context.GetSystemService (Context.ConnectivityService);
bool output = conMgr.ActiveNetworkInfo != null
                        && conMgr.ActiveNetworkInfo.IsAvailable && conMgr
                              .ActiveNetworkInfo.IsConnected;
conMgr.Dispose ();
return output;

It works fine on all my test devices except Vodafone 858 (Huawei). On this device I get false even when there's an Edge/3G or WiFi connection available. Any ideas why it behaves like this?

Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120625/91589626/attachment.html>


More information about the Monodroid mailing list