• Stars
    star
    379
  • Rank 109,620 (Top 3 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

libvirt-hook-qemu

Libvirt hook for setting up iptables port-forwarding rules when using NAT-ed networking.
Python
216
star
2

godaddy-dyndns

DynDNS-like public IP auto-updater script for GoDaddy
Python
80
star
3

BirthdayCalendar

Get a birthday calendar for all your social networks right inside your calendar app (such as Google Calendar). Supports all apps which sync contacts with your Android device, that includes many social network and messaging apps. Enable reminder alarms and decide which contacts you want to see. You'll get notifications for all of them.
HTML
72
star
4

PlanningPoker

Fast and simple Planning Poker Android app. Designed for phones, tablets and Android Wear devices.
Kotlin
68
star
5

android-exoplayer2-ext-icy

ExoPlayer2 Shoutcast Metadata Protocol (ICY) extension
Java
27
star
6

docker-android-ndk

Android NDK Docker container including CMake based on Alpine Linux
Shell
26
star
7

Kase64

Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
Kotlin
24
star
8

android-versioninfo

A version info widget for Android. Material style.
Java
21
star
9

android-textoverlay

Provides a simple service that allows to display arbitrary text as a system-window overlay.
Java
20
star
10

android-pls-parser

A playlist file (*.pls) parser library for Android
Java
18
star
11

Log4K

Lightweight logging library for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
Kotlin
13
star
12

docker-android-sdk

Android SDK OCI container image with pre-installed build-tools based on latest command-line tools and JDK 11 (or later).
Shell
13
star
13

android-social-fragment

A reusable fragment to display links to social networks, the Play Store as well as recommendation and support email links
Java
13
star
14

rapport

Work report generator for the lazyâ„¢
Python
8
star
15

Kex

Hex string encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
Kotlin
7
star
16

dotfiles

Sascha's shell environment
Shell
6
star
17

amarok2clementine

Shell script to import Amarok's rating, score and playcount into Clementine
Shell
3
star
18

docker-android-emulator

Android SDK with Emulator OCI / Docker image
Shell
3
star
19

go-json

Go
3
star
20

masonry

Mason-graph visualisation and computation utility
C++
3
star
21

docker-clang-format

Clang-Format Docker container based on Alpine Linux
Shell
3
star
22

android-utils

My often used Android classes
Java
3
star
23

docker-clang

Clang Docker container based on Alpine Linux
Shell
2
star
24

android-somascrobblerapi

SomaScrobblerApi for Android
Java
2
star
25

qtopia-filemanager

A file manager for the Qtopia mobile platform
C++
2
star
26

mozilla-plugins

Mozilla Firefox / Thunderbird plugins
2
star
27

kidcat

KidCat - the simple chat. Command-line threaded chat server and client written in ANSI C.
C
2
star
28

docker-kotlin

Kotlin Docker container based on Alpine Linux.
Shell
1
star
29

vscode-nc-hops

NC-HOPS® support for Visual Studio Code
TypeScript
1
star
30

android-discogs

Discogs API client for Android
Kotlin
1
star
31

tribool

Ternary (tree-valued) logic package for the Go programming language.
Go
1
star
32

gnome_picross

This is a simple paint by numbers game for Gnome written in Python.
Python
1
star
33

particle_fountain

Simple particle fountain effect written in x86-Assembler (NASM style).
Assembly
1
star
34

pascal-fire-demo

Fire effect demo written in Pascal
Pascal
1
star
35

self_healing

This is a cross-platform C++ library for self-healing and thus fault-rolerant data structures with a STL-compatible interface and released under the Boost Software License.
C++
1
star
36

GoHeader

Tool for translating C type declarations into its Go equivalent
Go
1
star
37

creatrepo

createrepo/rpm metadata This project defines the rpm-metadata (repodata) format and maintains one of the programs (createrepo) which create this format from existing rpms and other sources.
Python
1
star
38

satf

Runtime performance measurement tool for generic algorithms that uses gnuplot to generate nice plots
C++
1
star