It's not simple. I've only done it via C++ and you have to use the ConnectionManager APIs to do it. Take a look at the MSDN documentation on Connection Manager here http://msdn.microsoft.com/en-us/library/bb416435.aspx
Would you have some C++ code I could get inspired from? I'm really most interested in the specific function call you use to retried the data.
There are som connection manager wrappers for C# so I think I will get by on that.
I'm sorry, but I have to look through my archives for this. It will take some time, a resource I have little of. Will update you when I find it.
You can use this code :
var connectionState = new SystemState(SystemProperty.ConnectionsCellularCount);
connectionState.Changed += (o, s) =>
// show 3G Icon
// show H Icon
else if (SystemState.CellularSystemConnectedGprs)
// show GPRS Icon
else if (SystemState.CellularSystemConnectedEdge)
// show Edge Icon
Your project must aim at least WM6.0 sdk to have these properties.
This seems to do it :-) Thanks!
Just one small addition: I needed to add a reference to Microsoft.WindowsMobile.Telephony on top of the reference to Microsoft.WindowsMobile.Status else I get compile errors on SystemState.CellularSystem*
I did not need the event based state changes as I'm building a background logger thus I just used it like this:
WwanConnectionConnectedType = "Disconnected";
WwanConnectionConnectedType = "GPRS";
WwanConnectionConnectedType = "EDGE";
WwanConnectionConnectedType = "UMTS";
WwanConnectionConnectedType = "HSDPA";
WwanConnectionAvaliableType = "None";
WwanConnectionAvaliableType = "GPRS";
WwanConnectionAvaliableType = "EDGE";
WwanConnectionAvaliableType = "UMTS";
WwanConnectionAvaliableType = "HSDPA";