I am working with a Windows Universal app (shared backend between Windows 8.1 and Windows Phone 8.1, not Silverlight). The app connects to Azure with Azure Mobile Services. In the settings for the app I would like to have an option for synchronisation to only occur over a WiFi network.
How can I determine if the phone is connected to WiFi or a mobile network? Although from my research I have found ways to do this with older versions of Windows Phone and with Silverlight, it seems I can only determine if the device is connected to the internet in a Windows Universal app.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…