Open a browser or <a href="https://developer.chrome.com/multidevice/android/customtabs">Chrome Custom Tab</a>
with the given url.

@param requestCode the request code used to differentiate requests from one another.
@param url the url to open.
177607
public void browserSwitch(int requestCode, String url) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url))
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        ChromeCustomTabs.addChromeCustomTabsExtras(mContext, intent);

        browserSwitch(requestCode, intent);
    }
284531
public void setRequesttimeout(double requesttimeout) {
	long rt;
	if (requesttimeout <= 0) rt = Long.MAX_VALUE;
	else rt = (long) (requesttimeout * 1000);

	pageContext.setRequestTimeout(rt);
    }
1210228
public static FoxHttpAuthorizationScope create(final String url, final RequestType requestType) {
        if (url == null) {
            throw new IllegalArgumentException("url can not be null");
        }
        if (requestType == null) {
            throw new IllegalArgumentException("requestType can not be null");
        }
        if (url.length() == 0) {
            throw new IllegalArgumentException("url can not be empty");
        }
        return new FoxHttpAuthorizationScope(url, requestType.toString());
    }
842747
public static void putServiceOriginalUrlIntoRequestScope(final RequestContext requestContext, final WebApplicationService service) {
        requestContext.getRequestScope().put("originalUrl", service.getOriginalUrl());
    }
194765
protected ModelAndView buildCallbackViewViaRedirectUri(final J2EContext context, final String clientId,
                                                           final Authentication authentication, final OAuthCode code) {
        val attributes = authentication.getAttributes();
        val state = attributes.get(OAuth20Constants.STATE).get(0).toString();
        val nonce = attributes.get(OAuth20Constants.NONCE).get(0).toString();

        val redirectUri = context.getRequestParameter(OAuth20Constants.REDIRECT_URI);
        LOGGER.debug("Authorize request verification successful for client [{}] with redirect uri [{}]", clientId, redirectUri);

        var callbackUrl = redirectUri;
        callbackUrl = CommonHelper.addParameter(callbackUrl, OAuth20Constants.CODE, code.getId());
        if (StringUtils.isNotBlank(state)) {
            callbackUrl = CommonHelper.addParameter(callbackUrl, OAuth20Constants.STATE, state);
        }
        if (StringUtils.isNotBlank(nonce)) {
            callbackUrl = CommonHelper.addParameter(callbackUrl, OAuth20Constants.NONCE, nonce);
        }
        LOGGER.debug("Redirecting to URL [{}]", callbackUrl);
        val params = new LinkedHashMap<String, String>();
        params.put(OAuth20Constants.CODE, code.getId());
        params.put(OAuth20Constants.STATE, state);
        params.put(OAuth20Constants.NONCE, nonce);
        params.put(OAuth20Constants.CLIENT_ID, clientId);
        return buildResponseModelAndView(context, servicesManager, clientId, callbackUrl, params);
    }
279876
public void onReceivedAuthCode(String code, String baseDomain) {
        if (authType == AUTH_TYPE_WEBVIEW) {
            oauthView.setVisibility(View.INVISIBLE);
        }
        startMakingOAuthAPICall(code, baseDomain);
    }
1233791
public void setUrl(String url) {
        this.url = url;
        
        if (clazz == null && url != null) {
            setClazz(ElementPlugin.class);
        }
    }
1355235
public void onActivityResult(int requestCode, int resultCode, Intent data) {
        onActivityResult(requestCode, resultCode, data, null);
    }
934072
static void openURL(String url) {
    try {
      openURL(new URL(url));
    } catch (MalformedURLException ex) {
      Tools.showError(ex);
    }
  }
903054
public void enableJavascriptAndSetRobotiumWebClient(List<WebView> webViews, WebChromeClient originalWebChromeClient){
		this.originalWebChromeClient = originalWebChromeClient;
		for(final WebView webView : webViews){
			if(webView != null){ 
				inst.runOnMainSync(new Runnable() {
					public void run() {
						webView.getSettings().setJavaScriptEnabled(true);
						webView.setWebChromeClient(robotiumWebClient);
					}
				});
			}
		}
	}
1291557
public void startActivityForResult(Class clz,int requestCode) {
        act.startActivityForResult(new Intent(getContext(),clz),requestCode);
    }
334730
private static HttpURLConnection open(URL url) throws IOException {
        HttpURLConnection c = (HttpURLConnection)url.openConnection();
        c.setReadTimeout(TIMEOUT);
        c.setConnectTimeout(TIMEOUT);
        return c;
    }
862601
private String requestWebPage(URL url) throws FanartTvException {
        try {
            HttpGet httpGet = new HttpGet(url.toURI());
            httpGet.addHeader("accept", "application/json");
            final DigestedResponse response = DigestedResponseReader.requestContent(httpClient, httpGet, charset);

            if (response.getStatusCode() >= 500) {
                throw new FanartTvException(ApiExceptionType.HTTP_503_ERROR, response.getContent(), response.getStatusCode(), url);
            } else if (response.getStatusCode() >= 300) {
                throw new FanartTvException(ApiExceptionType.HTTP_404_ERROR, response.getContent(), response.getStatusCode(), url);
            }

            return response.getContent();
        } catch (URISyntaxException ex) {
            throw new FanartTvException(ApiExceptionType.CONNECTION_ERROR, "Invalid URL", url, ex);
        } catch (IOException ex) {
            throw new FanartTvException(ApiExceptionType.CONNECTION_ERROR, "Error retrieving URL", url, ex);
        }
    }
220669
public static void openLink(String url) throws IOException, URISyntaxException {
        Desktop.getDesktop().browse(new URI(url));
    }
1365174
public void enqueueURL(VisitState visitState, final ByteArrayList url) throws IOException {
		final byte[] urlBuffer = url.elements();
		final int pathQueryStart = BURL.startOfpathAndQuery(urlBuffer);
		byteArrayDiskQueues.enqueue(visitState,  urlBuffer, pathQueryStart, url.size() - pathQueryStart);
	}
18
public void setUrl(final String url) {
		MenuItemModel model = getOrCreateComponentModel();
		model.url = url;
		model.action = null;
	}
921079
public static void startActivity(Context context, Intent intent,
                                     int requestCode) {
        ThemeManager.startActivity(context, intent, requestCode, null);
    }