{"id":28248253,"url":"https://github.com/droibit/customtabslauncher","last_synced_at":"2026-05-03T05:03:59.243Z","repository":{"id":46609709,"uuid":"57131679","full_name":"droibit/CustomTabsLauncher","owner":"droibit","description":"Library to help the launch of Custom Tabs.","archived":false,"fork":false,"pushed_at":"2026-02-22T08:37:00.000Z","size":355,"stargazers_count":8,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-22T13:43:42.033Z","etag":null,"topics":["android-library","chrome-custom-tabs","chrome-customtabs","kotlin-android"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droibit.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-04-26T13:44:41.000Z","updated_at":"2026-02-22T08:36:49.000Z","dependencies_parsed_at":"2023-11-09T11:06:57.242Z","dependency_job_id":"85502569-c816-48bf-8f25-b417fe3726c2","html_url":"https://github.com/droibit/CustomTabsLauncher","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/droibit/CustomTabsLauncher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droibit%2FCustomTabsLauncher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droibit%2FCustomTabsLauncher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droibit%2FCustomTabsLauncher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droibit%2FCustomTabsLauncher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droibit","download_url":"https://codeload.github.com/droibit/CustomTabsLauncher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droibit%2FCustomTabsLauncher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30415448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:25:42.844Z","status":"ssl_error","status_checked_at":"2026-03-12T04:25:34.624Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android-library","chrome-custom-tabs","chrome-customtabs","kotlin-android"],"created_at":"2025-05-19T11:23:07.030Z","updated_at":"2026-05-03T05:03:59.235Z","avatar_url":"https://github.com/droibit.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CustomTabsLauncher\n\n[![Android CI](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml/badge.svg)](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml)\n[![Download](https://img.shields.io/maven-central/v/io.github.droibit/customtabslauncher/4.1.0)](https://central.sonatype.com/artifact/io.github.droibit/customtabslauncher/4.1.0)\n[![Software License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](https://github.com/droibit/prefbinding/blob/develop/LICENSE)\n\nThis library makes it easy to\nlaunch [Custom Tabs](https://developer.chrome.com/docs/android/custom-tabs) directly from your app.\n\nIn some user environments, Custom Tabs may not launch directly. This can happen in the following\ncases:\n\n- Multiple browser apps are installed on the device.\n- The default browser is not Chrome.\n\nCustom Tabs can be displayed as a screen within your app, allowing you to customize the look and feel.  \nFor this reason, I created this library to make it easier to launch Chrome Custom Tabs directly.\n\n## Download\n\nAdd the following dependency to your `build.gradle` file:\n\n```kotlin\nimplementation(\"io.github.droibit:customtabslauncher:LATEST_VERSION\")\n\n// Recommended: Declare androidx.browser explicitly as a dependency.\n// implementation 'androidx.browser:browser:LATEST_VERSION'\n```\n\n## Usage\n\n### Basic Usage\n\n#### Launch with Chrome Custom Tabs\n\n```kotlin\ntry {\n  val customTabsIntent = buildCustomTabsIntent()\n    .setChromeCustomTabsPackage(context)\n  customTabsIntent.launchUrl(context, Uri.parse(\"https://example.com\"))\n} catch (e: ActivityNotFoundException) {\n  // Launch WebView, display a toast, etc.     \n}\n```\n\n#### Launch with the default browser that supports Custom Tabs\n\n```kotlin\ntry {\n  val customTabsIntent = buildCustomTabsIntent()\n    .setCustomTabsPackage(context)\n  customTabsIntent.launchUrl(context, Uri.parse(\"https://example.com\"))\n} catch (e: ActivityNotFoundException) {\n  // Launch WebView, display a toast, etc.     \n}\n```\n\n### Present a Custom Tab as a bottom sheet\n\n```kotlin\nval activityLauncher = registerForActivityResult(StartActivityForResult()) {\n  // Do something.\n}\n\ntry {\n  val customTabsIntent = buildCustomTabsIntent().apply {\n    setChromeCustomTabsPackage(context) // or setCustomTabsPackage(context)\n    intent.data = Uri.parse(\"https://example.com\")\n  }\n  activityLauncher.launch(customTabsIntent.intent)\n} catch (e: ActivityNotFoundException) {\n  // Launch WebView, display a toast, etc.     \n}\n```\n\n### Fallback to a non-Chrome browser\n\n```kotlin\nbuildCustomTabsIntent()\n  .setChromeCustomTabsPackage( // or .setCustomTabsPackage(\n    context,\n    // Launch a browser that supports Custom Tabs (non-Chrome).\n    NonChromeCustomTabs(context)\n    // or launch a specific browser that supports Custom Tabs.\n    // NonChromeCustomTabs(\n    //   listOf(\"org.mozilla.firefox\", \"com.microsoft.emmx\")\n    // )\n  )\n```\n\n### Authentication using the Auth Tab\n\n```kotlin\nval launcher = AuthTabIntent.registerActivityResultLauncher(context) { result -\u003e\n  // Handle the result of the Auth Tab.\n}\nval authTabIntent = buildAuthTabIntent()\n  .setChromeCustomTabsPackage(context)\nauthTabIntent.launch(launcher, AUTHENTICATION_URL, REDIRECT_SCHEME)\n```\n\n## License\n\n    Copyright (C) 2015 The Android Open Source Project\n    Copyright (C) 2016 Shinya Kumagai\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroibit%2Fcustomtabslauncher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroibit%2Fcustomtabslauncher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroibit%2Fcustomtabslauncher/lists"}