Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #42 from novoda/update-to-0.1.6-for-release
Browse files Browse the repository at this point in the history
Increase version to 0.1.6
  • Loading branch information
ouchadam authored Apr 12, 2018
2 parents 26ba0dc + cd038da commit ea83dd0
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 95 deletions.
188 changes: 94 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
# simple-chrome-custom-tabs [![](https://ci.novoda.com/buildStatus/icon?job=simple-chrome-custom-tabs)](https://ci.novoda.com/job/simple-chrome-custom-tabs/lastBuild/console) [![Download](https://api.bintray.com/packages/novoda/maven/simple-chrome-custom-tabs/images/download.svg) ](https://bintray.com/novoda/maven/simple-chrome-custom-tabs/_latestVersion) [![](https://raw.githubusercontent.com/novoda/novoda/master/assets/btn_apache_lisence.png)](LICENCE.txt)


- Navigating to external websites from your app?
- *"Yes, that one is easy"*
- Wondering how to keep the user in context?
- *"I know... it can be done using WebView, but I don't like it that much"*
- Aha! Why don't you try Chrome Custom Tabs?
- *"Integrating it into my app can be a pain..."*
- Not anymore!

**simple-chrome-custom-tabs** will help you with that.

## Description

**simple-chrome-custom-tabs** provides easy integration of Chrome Custom Tabs into your project.
Just connect it to your activity, and navigate to the external website styling your tab as you wish.
Moreover with Custom Tabs the navigation can be nearly instantaneous!

More information about Chrome Custom Tabs available at: https://developer.chrome.com/multidevice/android/customtabs

## Adding to your project

To start using this library, add these lines to the `build.gradle` of your project:

```groovy
repositories {
maven {
url "http://dl.bintray.com/novoda/maven"
}
}
dependencies {
compile 'com.novoda:simple-chrome-custom-tabs:0.1.5'
}
```


## Simple usage

1) Initialize `simple-chrome-custom-tabs`, you only have to this once.

```java
SimpleChromeCustomTabs.initialize(context);
```

2) Connect `simple-chrome-custom-tabs` to your `Activity` as soon as it is resumed.

```java
@Override
public void onResume() {
super.onResume();
SimpleChromeCustomTabs.getInstance().connectTo(this);
}
```

And don't forget to disconnect when the `Activity` is paused.

```java
@Override
public void onPause() {
SimpleChromeCustomTabs.getInstance().disconnectFrom(this);
super.onPause();
}
```

3) Navigate!

```java
Uri url = ANY_WEBSITE_URL;
NavigationFallback fallback = ANY_FALLBACK_MECHANISM; //In case something goes wrong.
IntentCustomizer customizer = ANY_INTENT_CUSTOMIZER; //To theme your tab.

SimpleChromeCustomTabs.getInstance().withFallback(fallback)
.withIntentCustomizer(customizer)
.navigateTo(url, activity);
```


**And voilà!!**

External Browser | simple-chrome-custom-tabs
--- | ---
![external_browser](https://github.com/novoda/simple-chrome-custom-tabs/blob/master/art/external_browser.gif) | ![simplechromecustomtabs](https://github.com/novoda/simple-chrome-custom-tabs/blob/master/art/simplechromecustomtabs.gif)

**Note**:
Check the [extended demo](https://github.com/novoda/simple-chrome-custom-tabs/tree/master/demo-extended) for further usage examples.

## Links

Here are a list of useful links:

* We always welcome people to contribute new features or bug fixes, [here is how](https://github.com/novoda/novoda/blob/master/CONTRIBUTING.md)
* If you have a problem or you feel that important functionality is missing check the [Issues Page](https://github.com/novoda/simple-chrome-custom-tabs/issues) first to see if we are working on it
# simple-chrome-custom-tabs [![](https://ci.novoda.com/buildStatus/icon?job=simple-chrome-custom-tabs)](https://ci.novoda.com/job/simple-chrome-custom-tabs/lastBuild/console) [![Download](https://api.bintray.com/packages/novoda/maven/simple-chrome-custom-tabs/images/download.svg) ](https://bintray.com/novoda/maven/simple-chrome-custom-tabs/_latestVersion) [![](https://raw.githubusercontent.com/novoda/novoda/master/assets/btn_apache_lisence.png)](LICENCE.txt)


- Navigating to external websites from your app?
- *"Yes, that one is easy"*
- Wondering how to keep the user in context?
- *"I know... it can be done using WebView, but I don't like it that much"*
- Aha! Why don't you try Chrome Custom Tabs?
- *"Integrating it into my app can be a pain..."*
- Not anymore!

**simple-chrome-custom-tabs** will help you with that.

## Description

**simple-chrome-custom-tabs** provides easy integration of Chrome Custom Tabs into your project.
Just connect it to your activity, and navigate to the external website styling your tab as you wish.
Moreover with Custom Tabs the navigation can be nearly instantaneous!

More information about Chrome Custom Tabs available at: https://developer.chrome.com/multidevice/android/customtabs

## Adding to your project

To start using this library, add these lines to the `build.gradle` of your project:

```groovy
repositories {
maven {
url "http://dl.bintray.com/novoda/maven"
}
}
dependencies {
compile 'com.novoda:simple-chrome-custom-tabs:0.1.6'
}
```


## Simple usage

1) Initialize `simple-chrome-custom-tabs`, you only have to this once.

```java
SimpleChromeCustomTabs.initialize(context);
```

2) Connect `simple-chrome-custom-tabs` to your `Activity` as soon as it is resumed.

```java
@Override
public void onResume() {
super.onResume();
SimpleChromeCustomTabs.getInstance().connectTo(this);
}
```

And don't forget to disconnect when the `Activity` is paused.

```java
@Override
public void onPause() {
SimpleChromeCustomTabs.getInstance().disconnectFrom(this);
super.onPause();
}
```

3) Navigate!

```java
Uri url = ANY_WEBSITE_URL;
NavigationFallback fallback = ANY_FALLBACK_MECHANISM; //In case something goes wrong.
IntentCustomizer customizer = ANY_INTENT_CUSTOMIZER; //To theme your tab.

SimpleChromeCustomTabs.getInstance().withFallback(fallback)
.withIntentCustomizer(customizer)
.navigateTo(url, activity);
```


**And voilà!!**

External Browser | simple-chrome-custom-tabs
--- | ---
![external_browser](https://github.com/novoda/simple-chrome-custom-tabs/blob/master/art/external_browser.gif) | ![simplechromecustomtabs](https://github.com/novoda/simple-chrome-custom-tabs/blob/master/art/simplechromecustomtabs.gif)

**Note**:
Check the [extended demo](https://github.com/novoda/simple-chrome-custom-tabs/tree/master/demo-extended) for further usage examples.

## Links

Here are a list of useful links:

* We always welcome people to contribute new features or bug fixes, [here is how](https://github.com/novoda/novoda/blob/master/CONTRIBUTING.md)
* If you have a problem or you feel that important functionality is missing check the [Issues Page](https://github.com/novoda/simple-chrome-custom-tabs/issues) first to see if we are working on it
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ publish {
userOrg = 'novoda'
groupId = 'com.novoda'
artifactId = 'simple-chrome-custom-tabs'
publishVersion = '0.1.5'
publishVersion = '0.1.6'
description = 'Provides easy integration of Chrome Custom Tabs into your project.'
website = 'https://github.com/novoda/simplechromecustomtabs'
}
Expand Down

0 comments on commit ea83dd0

Please sign in to comment.