{"id":18825374,"url":"https://github.com/outsystems/osinappbrowserlib-android","last_synced_at":"2025-04-11T11:35:27.712Z","repository":{"id":249977117,"uuid":"807641183","full_name":"OutSystems/OSInAppBrowserLib-Android","owner":"OutSystems","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-02T16:22:59.000Z","size":617,"stargazers_count":0,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T16:48:48.540Z","etag":null,"topics":["snyk-mobile"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutSystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-29T13:44:57.000Z","updated_at":"2025-04-02T16:17:12.000Z","dependencies_parsed_at":"2024-09-13T00:51:04.419Z","dependency_job_id":"3f5cf2ae-4a40-49f8-b4cb-bce5bb0ddc6b","html_url":"https://github.com/OutSystems/OSInAppBrowserLib-Android","commit_stats":null,"previous_names":["outsystems/osinappbrowserlib-android"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSInAppBrowserLib-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSInAppBrowserLib-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSInAppBrowserLib-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSInAppBrowserLib-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutSystems","download_url":"https://codeload.github.com/OutSystems/OSInAppBrowserLib-Android/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248384573,"owners_count":21094743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["snyk-mobile"],"created_at":"2024-11-08T00:59:15.256Z","updated_at":"2025-04-11T11:35:27.688Z","avatar_url":"https://github.com/OutSystems.png","language":"Kotlin","readme":"# OSInAppBrowserLib\n\nThe `OSInAppBrowserLib-Android` is a library built using `Kotlin` that provides a web browser view to load a web page within a Mobile Application. It behaves as a standard web browser and is useful to load untrusted content without risking your application's security.\n\nThe `OSIABEngine` structure provides the main features of the Library, which are 3 different ways to open a URL:\n- using an External Browser;\n- using a System Browser;\n- using a Web View.\n\nThere's also an `OSIABClosable` interface that handles closing an opened browser.\n\nEach is detailed in the following sections.\n\n## Index\n\n- [Motivation](#motivation)\n- [Usage](#usage)\n- [Methods](#methods)\n    - [Open a URL in an External Browser](#open-a-url-in-an-external-browser)\n    - [Open a URL in a System Browser](#open-a-url-in-a-system-browser)\n    - [Open a URL in a Web View](#open-a-url-in-a-web-view)\n    - [Close](#close)\n\n## Motivation\n\nThis library is to be used by the InAppBrowser Plugin for [OutSystems' Cordova Plugin](https://github.com/OutSystems/cordova-outsystems-inappbrowser) and [Ionic's Capacitor Plugin](https://github.com/ionic-team/capacitor-os-inappbrowser).\n\n## Usage\n\nIn your app-level gradle file, import the `OSInAppBrowserLib` library like so:\n\n    dependencies {\n    \timplementation(\"com.github.outsystems:osinappbrowser-android:1.0.0@aar\")\n\t}\n\n\n## Methods\n\nAs mentioned before, the library offers the `OSIABEngine` structure that provides the following methods to interact with:\n\n### Open a URL in an External Browser\n\n```kotlin\nfun openExternalBrowser(externalBrowserRouter: OSIABRouter\u003cBoolean\u003e, url: String, completionHandler: (Boolean) -\u003e Unit)\n```\n\nUses the parameter `externalBrowserRouter` - an object that offers an External Browser interface - to open the parameter `url`. The method is composed of the following input parameters:\n- **url**: the URL for the web page to be opened.\n- **externalBrowserRouter**: The External Browser interface that will open the URL. Its return type should be `Bool`. The library provides an `OSIABExternalBrowserRouterAdapter` class that delegates the open operation to the device's default browser.\n- **completionHandler**: The callback with the result of opening the URL with the External Browser interface.\n\n### Open a URL in a System Browser\n\n```kotlin\nfun openCustomTabs(customTabsRouter: OSIABRouter\u003cBoolean\u003e, url: String, completionHandler: (Boolean) -\u003e Unit)\n```\n\nUses the parameter `customTabsRouter` - an object that offers a System Browser interface - to open the parameter `url`. The method is composed of the following input parameters:\n- **url**: the URL for the web page to be opened.\n- **customTabsRouter**: The System Browser interface that will open the URL. The library provides an `OSIABCustomTabsRouterAdapter` class that uses a `CustomTabsSession` object to open it. \n- **completionHandler**: The callback with the result of opening the URL with the System Browser interface.\n\n### Open a URL in a Web View\n\n```kotlin\nfun openWebView(webViewRouter: OSIABRouter\u003cBoolean\u003e, url: String, completionHandler: (Boolean) -\u003e Unit)\n```\n\nUses the parameter `webViewRouter` - an object that offers a Web View interface - to open the parameter `url`. The method is composed of the following input parameters:\n- **url**: the URL for the web page to be opened.\n- **webViewRouter**: The Web View interface that will open the URL. The library provides an `OSIABWebViewRouterAdapter` class that uses `WebView` to open it. \n- **completionHandler**: The callback with the result of opening the URL with the Web View interface.\n\n### Close\n\n```kotlin\nfun close(completionHandler: (Boolean) -\u003e Unit)\n```\n\nHandles closing an opened browser. The method is composed of the following input parameters:\n- **completionHandler**: The callback with the result of closing the browser.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fosinappbrowserlib-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutsystems%2Fosinappbrowserlib-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fosinappbrowserlib-android/lists"}