Android CustomTabs

Chrome CustomTabs for Android demystified. Simplifies development and provides higher level classes including fallback in case Chrome isn't available on device.

Лицензия

Лицензия

Группа

Группа

de.peilicke.sascha
Идентификатор

Идентификатор

android-customtabs
Последняя версия

Последняя версия

3.0.3
Дата

Дата

Тип

Тип

aar
Описание

Описание

Android CustomTabs
Chrome CustomTabs for Android demystified. Simplifies development and provides higher level classes including fallback in case Chrome isn't available on device.
Ссылка на сайт

Ссылка на сайт

https://github.com/saschpe/android-customtabs
Система контроля версий

Система контроля версий

https://github.com/saschpe/android-customtabs

Скачать android-customtabs

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/de.peilicke.sascha/android-customtabs/ -->
<dependency>
    <groupId>de.peilicke.sascha</groupId>
    <artifactId>android-customtabs</artifactId>
    <version>3.0.3</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/de.peilicke.sascha/android-customtabs/
implementation 'de.peilicke.sascha:android-customtabs:3.0.3'
// https://jarcasting.com/artifacts/de.peilicke.sascha/android-customtabs/
implementation ("de.peilicke.sascha:android-customtabs:3.0.3")
'de.peilicke.sascha:android-customtabs:aar:3.0.3'
<dependency org="de.peilicke.sascha" name="android-customtabs" rev="3.0.3">
  <artifact name="android-customtabs" type="aar" />
</dependency>
@Grapes(
@Grab(group='de.peilicke.sascha', module='android-customtabs', version='3.0.3')
)
libraryDependencies += "de.peilicke.sascha" % "android-customtabs" % "3.0.3"
[de.peilicke.sascha/android-customtabs "3.0.3"]

Зависимости

runtime (3)

Идентификатор библиотеки Тип Версия
androidx.browser » browser jar 1.2.0
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.5.0
androidx.appcompat » appcompat jar 1.2.0

Модули Проекта

Данный проект не имеет модулей.

Android CustomTabs

Maven Central Android Arsenal License Build Status

Chrome CustomTabs for Android demystified. Simplifies development and provides higher level classes including fallback in case Chrome isn't available on device.

Usage

How to create a new custom tab intent and start it with a keep-alive service as well as a fallback to plain old WebView should Chrome not be available on the device:

CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
        .addDefaultShareMenuItem()
        .setToolbarColor(this.getResources().getColor(R.color.colorPrimary))
        .setShowTitle(true)
        .setCloseButtonIcon(backArrow)
        .build();

// This is optional but recommended
CustomTabsHelper.addKeepAliveExtra(this, customTabsIntent.intent);

// This is where the magic happens...
CustomTabsHelper.openCustomTab(this, customTabsIntent,
        Uri.parse("https://github.com/saschpe/android-customtabs"),
        new WebViewFallback());

Preload CustomTabs in your Application.java to warm-up early and reduce start-up time:

// Preload custom tabs service for improved performance
// This is optional but recommended
registerActivityLifecycleCallbacks(new CustomTabsActivityLifecycleCallbacks());

Screenshots

Screenshot 1

Screenshot 2

Screenshot 3

Download

Artifacts are published to Maven Central:

repositories {
    mavenCentral()
}

dependencies {
    implementation("de.peilicke.sascha:android-customtabs:3.0.3")
}

In use by

License

Copyright 2017 Sascha Peilicke

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Версии библиотеки

Версия
3.0.3
3.0.2