Hi,
I'm trying to resolve an issue with an app I'm porting from iPhone to
Android and I'm going through everything bit by bit.
The problem is that whenever the app attempts to the outside world, it
falls over dead. Works fine on the emulator, dies on a phone. One thing
I'm looking at is the way I'm connecting to the outside world.
The manifest has INTERNET enabled, so it's not likely to be that.
Next is the test for the outside world connection...
public bool checkForNetwork(bool mobile)
{
ConnectivityManager connectivityManager =
(ConnectivityManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.ConnectivityService);
NetworkInfo networkInfo =
connectivityManager.GetNetworkInfo(mobile ?
Android.Net.ConnectivityType.Mobile :
Android.Net.ConnectivityType.Wifi);
if (networkInfo.IsConnected ||
networkInfo.IsConnectedOrConnecting)
return true;
else
return false;
}
I then test for "true" being returned. mobile tests for wifi being
either mobile or wifi. I know there is a connecting one as well - could
this be the problem?
Any advice would be appreciated.
Paul
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid