Interface BrowserService

  • All Known Implementing Classes:
    AndroidBrowserService, DummyBrowserService, IOSBrowserService

    public interface BrowserService
    Launches the default browser of the platform as a separate application process. The browser will be opened with the provided URL.

    Example

     BrowserService.create().ifPresent(service -> {
          service.launchExternalBrowser("https://gluonhq.com/");
      });

    Android Configuration: none

    iOS Configuration: none

    Since:
    3.0.0
    • Method Detail

      • launchExternalBrowser

        void launchExternalBrowser​(java.lang.String url)
                            throws java.io.IOException,
                                   java.net.URISyntaxException
        Launches the user-default browser to show a specified URL.
        Parameters:
        url - The URL to load when the browser application opens.
        Throws:
        java.io.IOException - If the URL can't be opened
        java.net.URISyntaxException - If it is not a valid URL string