I\'ve been working on a Windows Phone 7 app for a few months now and have a collection of useful detection flags that are used to test for things like if the code is running
Gabor Dolhai has a full blog post on Zune Detection and Network Awareness, which uses a combiantion of NetworkInterfaceType detection and the NetworkAddressChangeed event.