Forum Cross Platform with Xamarin

How to set a connection type; How to select from available connections

With the Connectivity plugin I can proof if a connection type is available but how can I use a certain connection for the communication (get, post using REST)?


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Are you saying you want to force the connection through cellular even when wifi is available, etc.?
    Generally speaking, that type of micro-management isn't needed. Let the OS use the right connection based on its rules which include the user's settings. If the user doesn't want to allow large downloads on cellular its not the place of your app to side-step that decision.

  • A.StudentA.Student USMember ✭✭

    My employer told me he could not use Wlan for the communication of the app, WebClient and HttpClient work using the standard internet connections of the mobile phone. The apps works very well on the iOS and Android emulator.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    My employer told me he could not use Wlan for the communication of the app,

    Well there's a dozen reasons why the local wifi wasn't working for the app. For example, the wifi network was down but reporting internet connectivity... the wifi provider (your workplace) may be filtering connectivity. For example, you can't use Facebook from the company network. The firewall at your work has the target endpoint blacklisted {...}

    Just because wifi didn't work for him at one place doesn't mean the response is to try to bypass how the OS works to manage connectivity.

  • A.StudentA.Student USMember ✭✭

    Thank you very much, I thought the same. I work from home but I will inform him to change some of his local network options.

Sign In or Register to comment.