androidandroid-wifirestrictions

Allow only 1 app to connect to specific WiFi


At my company, we want to restrict Users (having Android Devices) to access only 1 application using Company Internet.

For example, when I'm in the company and I'm connected to the WiFi, I should be able to access only my company's Application.

Is this possible?


Solution

  • This would not be done using an app. You would use a network proxy or manage the proxy settings on the devices themselves.

    Using a WebView you can restrict loading other urls with this code:

    webView = (WebView) findViewById(R.id.webview);
    webView.setWebViewClient(new WebViewClient() {
      public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if(url.contains("*your url here*")) {
          view.loadUrl(url);
        }
        return true;
      }
    });