Well.... I answer it myself... :-)
This one works on Vodafone 858 also:
ConnectivityManager conMgr = (ConnectivityManager)context.GetSystemService
(Context.ConnectivityService);
return conMgr.ActiveNetworkInfo != null
&& conMgr.ActiveNetworkInfo.IsAvailable && conMgr
.ActiveNetworkInfo.IsConnectedOrConnecting;
Petr
From: [email protected]
[mailto:[email protected]] On Behalf Of Petr Slovácek
Sent: 25. června 2012 15:11
To: [email protected]
Subject: [mono-android] Check for internet connection fails on Vodafone 858
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
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid