locked
Can I switch Data Connection and wi-fi in my WP8 app? RRS feed

  • Question

  • Can I switch Data Connection and wi-fi in my WP8 app whitout using system setting menu?When Data Connection and wi-fi are all ON,the app how to know which one is using?

    Thanks!

    Thursday, February 6, 2014 2:11 PM

Answers

  • Apps cannot directly control system settings. You can offer the user a chance to do so via the ConnectionSettingsTask. You can query information about the connection with the NetworkInformation classes.
    • Marked as answer by yang2013yang Thursday, February 6, 2014 2:59 PM
    • Unmarked as answer by yang2013yang Thursday, February 6, 2014 3:01 PM
    • Marked as answer by yang2013yang Thursday, February 6, 2014 3:10 PM
    Thursday, February 6, 2014 2:58 PM
  • You need to use NetworkInformation class NetworkInterfaceType property
    • Edited by WinZep Thursday, February 6, 2014 3:04 PM
    • Marked as answer by yang2013yang Thursday, February 6, 2014 3:10 PM
    Thursday, February 6, 2014 3:04 PM

All replies

  • Hello!

    Look at this - http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202867(v=vs.105).aspx




    • Edited by WinZep Thursday, February 6, 2014 3:02 PM
    Thursday, February 6, 2014 2:54 PM
  • Apps cannot directly control system settings. You can offer the user a chance to do so via the ConnectionSettingsTask. You can query information about the connection with the NetworkInformation classes.
    • Marked as answer by yang2013yang Thursday, February 6, 2014 2:59 PM
    • Unmarked as answer by yang2013yang Thursday, February 6, 2014 3:01 PM
    • Marked as answer by yang2013yang Thursday, February 6, 2014 3:10 PM
    Thursday, February 6, 2014 2:58 PM
  • When Data Connection and wi-fi are all ON,the app how to know which one is using?
    Thursday, February 6, 2014 3:01 PM
  • You need to use NetworkInformation class NetworkInterfaceType property
    • Edited by WinZep Thursday, February 6, 2014 3:04 PM
    • Marked as answer by yang2013yang Thursday, February 6, 2014 3:10 PM
    Thursday, February 6, 2014 3:04 PM
  • And look this topic - http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh487166(v=vs.105).aspx it must be help for you
    Thursday, February 6, 2014 3:11 PM