Skip to content

Commit 9a7921b

Browse files
committed
Release 3.3.0
1 parent 6beaa58 commit 9a7921b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+153
-62
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# browser-switch-android Release Notes
22

3-
## unreleased
3+
## 3.3.0
44

55
* Add AuthTab Support
66
* Upgrade `androidx.browser:browser` dependency version to 1.9.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add the library to your dependencies in your `build.gradle`:
1212

1313
```groovy
1414
dependencies {
15-
implementation 'com.braintreepayments.api:browser-switch:3.2.0'
15+
implementation 'com.braintreepayments.api:browser-switch:3.3.0'
1616
}
1717
```
1818

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ plugins {
4040
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
4141
}
4242

43-
version = '3.2.1-SNAPSHOT'
43+
version = '3.3.0'
4444
group = "com.braintreepayments"
4545
ext {
4646
compileSdkVersion = 36

docs/browser-switch/com.braintreepayments.api/-browser-switch-client/-browser-switch-client.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<a class="library-name--link" href="../../../index.html">
4242
browser-switch-android
4343
</a> </div>
44-
<div class="library-version">3.1.1-SNAPSHOT
44+
<div class="library-version">3.2.1-SNAPSHOT
4545
</div>
4646
</div>
4747
<div class="filter-section" id="filter-section">
@@ -63,7 +63,7 @@
6363
<div class="cover ">
6464
<h1 class="cover"><span>Browser</span><wbr><span>Switch</span><wbr><span><span>Client</span></span></h1>
6565
</div>
66-
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":browser-switch:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span></div><p class="paragraph">Construct a client that manages the logic for browser switching.</p></div></div>
66+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":browser-switch:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span></div><p class="paragraph">Construct a client that manages browser switching with Chrome Custom Tabs fallback only. This constructor does not initialize Auth Tab support. For Auth Tab functionality, use <a href="-browser-switch-client.html">BrowserSwitchClient</a> instead.</p><hr><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html"><span class="token annotation builtin">NonNull</span></a>&nbsp;</span>caller<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller.html">ActivityResultCaller</a></span></span><span class="token punctuation">)</span></div><p class="paragraph">Construct a client that manages the logic for browser switching and automatically initializes the Auth Tab launcher. </p><p class="paragraph">IMPORTANT: This constructor enables the AuthTab functionality, which has several caveats: </p><ul><li>This constructor must be called in the activity/fragment's <code class="lang-kotlin">onCreate()</code> method to properly register the activity result launcher before the activity/fragment is started. </li><li>The caller must be an <a href="https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller.html">ActivityResultCaller</a> to register for activity results. </li><li><a href="../-launch-type/-a-c-t-i-v-i-t-y_-n-e-w_-t-a-s-k/index.html">ACTIVITY_NEW_TASK</a> is not supported when using AuthTab and will be ignored. Only <a href="../-launch-type/-a-c-t-i-v-i-t-y_-c-l-e-a-r_-t-o-p/index.html">ACTIVITY_CLEAR_TOP</a> is supported with AuthTab. </li><li>When using SingleTop activities, you must check for launcher results in <code class="lang-kotlin">onResume()</code> as well as in <code class="lang-kotlin">onNewIntent()</code>, since the AuthTab activity result might be delivered during the resuming phase. </li><li>Care must be taken to avoid calling <a href="complete-request.html">completeRequest</a> multiple times for the same result. Merchants should properly track their pending request state to ensure the completeRequest method is only called once per browser switch session. </li><li>AuthTab support is browser version dependent. It requires Chrome version 137 or higher on the user's device. On devices with older browser versions, the library will automatically fall back to Custom Tabs. This means that enabling AuthTab is not guaranteed to use the AuthTab flow if the user's browser version is too old. </li></ul><p class="paragraph">Consider using the default constructor <a href="-browser-switch-client.html">BrowserSwitchClient</a> if these limitations are incompatible with your implementation.</p><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":browser-switch:dokkaHtmlPartial/release" data-filterable-set=":browser-switch:dokkaHtmlPartial/release"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>caller</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The ActivityResultCaller used to initialize the Auth Tab launcher.</p></div></div></div></div></div></div></div>
6767
</div>
6868
<div class="footer">
6969
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2025 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>

docs/browser-switch/com.braintreepayments.api/-browser-switch-client/assert-can-perform-browser-switch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<a class="library-name--link" href="../../../index.html">
4242
browser-switch-android
4343
</a> </div>
44-
<div class="library-version">3.1.1-SNAPSHOT
44+
<div class="library-version">3.2.1-SNAPSHOT
4545
</div>
4646
</div>
4747
<div class="filter-section" id="filter-section">

docs/browser-switch/com.braintreepayments.api/-browser-switch-client/complete-request.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<a class="library-name--link" href="../../../index.html">
4242
browser-switch-android
4343
</a> </div>
44-
<div class="library-version">3.1.1-SNAPSHOT
44+
<div class="library-version">3.2.1-SNAPSHOT
4545
</div>
4646
</div>
4747
<div class="filter-section" id="filter-section">
@@ -63,7 +63,7 @@
6363
<div class="cover ">
6464
<h1 class="cover"><span>complete</span><wbr><span><span>Request</span></span></h1>
6565
</div>
66-
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":browser-switch:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">open </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="complete-request.html"><span class="token function">completeRequest</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html"><span class="token annotation builtin">NonNull</span></a>&nbsp;</span>intent<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/content/Intent.html">Intent</a><span class="token punctuation">, </span></span><span class="parameter "><span><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html"><span class="token annotation builtin">NonNull</span></a>&nbsp;</span>pendingRequest<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../-browser-switch-final-result/index.html">BrowserSwitchFinalResult</a></div><p class="paragraph">Completes the browser switch flow and returns a browser switch result if a match is found for the given <a href="../-browser-switch-request/index.html">BrowserSwitchRequest</a></p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">a <a href="../-browser-switch-final-result/-success/index.html">BrowserSwitchFinalResult.Success</a> if the browser switch was successfully completed, or <a href="../-browser-switch-final-result/-no-result/index.html">BrowserSwitchFinalResult.NoResult</a> if no result can be found for the given pending request String. A <a href="../-browser-switch-final-result/-no-result/index.html">BrowserSwitchFinalResult.NoResult</a> will be returned if the user returns to the app without completing the browser switch flow.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":browser-switch:dokkaHtmlPartial/release" data-filterable-set=":browser-switch:dokkaHtmlPartial/release"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>intent</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the intent to return to your application containing a deep link result from the browser flow</p></div></div></div></div><div class="table-row" data-filterable-current=":browser-switch:dokkaHtmlPartial/release" data-filterable-set=":browser-switch:dokkaHtmlPartial/release"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>pending</span><wbr><span><span>Request</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the pending request string returned from <a href="../-browser-switch-start-result/-started/index.html">BrowserSwitchStartResult.Started</a> via <a href="start.html">start</a></p></div></div></div></div></div></div></div>
66+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":browser-switch:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">open </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="complete-request.html"><span class="token function">completeRequest</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html"><span class="token annotation builtin">NonNull</span></a>&nbsp;</span>intent<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/content/Intent.html">Intent</a><span class="token punctuation">, </span></span><span class="parameter "><span><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html"><span class="token annotation builtin">NonNull</span></a>&nbsp;</span>pendingRequest<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../-browser-switch-final-result/index.html">BrowserSwitchFinalResult</a></div><p class="paragraph">Completes the browser switch flow for both Auth Tab and Custom Tabs fallback scenarios. This method first checks if we have a result from the Auth Tab callback, and returns it if available. Otherwise, it follows the Custom Tabs flow. </p><p class="paragraph">See <a href="https://developer.chrome.com/docs/android/custom-tabs/guide-auth-tab#fallback_to_custom_tabs"> Auth Tab Fallback Documentation</a> for details on when Custom Tabs fallback is required </p><p class="paragraph">IMPORTANT: When using Auth Tab with SingleTop activities, you must call this method in both <code class="lang-kotlin">onNewIntent()</code>and<code class="lang-kotlin">onResume()</code> to ensure the result is properly processed regardless of which launch mode is used.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">a <a href="../-browser-switch-final-result/index.html">BrowserSwitchFinalResult</a></p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":browser-switch:dokkaHtmlPartial/release" data-filterable-set=":browser-switch:dokkaHtmlPartial/release"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>intent</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the intent to return to your application containing a deep link result</p></div></div></div></div><div class="table-row" data-filterable-current=":browser-switch:dokkaHtmlPartial/release" data-filterable-set=":browser-switch:dokkaHtmlPartial/release"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>pending</span><wbr><span><span>Request</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the pending request string returned from <a href="../-browser-switch-start-result/-started/index.html">BrowserSwitchStartResult.Started</a></p></div></div></div></div></div></div></div>
6767
</div>
6868
<div class="footer">
6969
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2025 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>

0 commit comments

Comments
 (0)