Skip to content

Commit 6b59376

Browse files
committed
Release 3.5.0
1 parent 11e8cb8 commit 6b59376

56 files changed

Lines changed: 111 additions & 111 deletions

Some content is hidden

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

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.5.0
44
* Add parameterized constructor `BrowserSwitchClient(ActivityResultRegistry)` for AuthTab support on Jetpack Compose
55
* Bump `androidx.browser` to `1.10.0-alpha02`
66

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.4.0'
15+
implementation 'com.braintreepayments.api:browser-switch:3.5.0'
1616
}
1717
```
1818

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ plugins {
4242
id 'io.gitlab.arturbosch.detekt' version '1.23.6'
4343
}
4444

45-
version = '3.4.1-SNAPSHOT'
45+
version = '3.5.0'
4646
group = "com.braintreepayments"
4747
ext {
4848
compileSdkVersion = 36

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

Lines changed: 3 additions & 3 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.3.1-SNAPSHOT
44+
<div class="library-version">3.4.1-SNAPSHOT
4545
</div>
4646
</div>
4747
<div class="filter-section" id="filter-section">
@@ -63,10 +63,10 @@
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 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>
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><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>registry<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry.html">ActivityResultRegistry</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. Use this constructor for flows where <a href="https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller.html">ActivityResultCaller</a> is not available. </p><p class="paragraph">IMPORTANT: This constructor enables the AuthTab functionality, which has several caveats: </p><ul><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>registry</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The ActivityResultRegistry used to initialize the Auth Tab launcher</p></div></div></div></div></div></div></div>
6767
</div>
6868
<div class="footer">
69-
<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>
69+
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2026 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>
7070
</div>
7171
</div>
7272
</div>

docs/browser-switch/com.braintreepayments.api/-browser-switch-client/assert-can-perform-browser-switch.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.3.1-SNAPSHOT
44+
<div class="library-version">3.4.1-SNAPSHOT
4545
</div>
4646
</div>
4747
<div class="filter-section" id="filter-section">
@@ -66,7 +66,7 @@ <h1 class="cover"><span>assert</span><wbr><span>Can</span><wbr><span>Perform</sp
6666
<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="assert-can-perform-browser-switch.html"><span class="token function">assertCanPerformBrowserSwitch</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">activity<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/app/Activity.html">Activity</a><span class="token punctuation">, </span></span><span class="parameter ">browserSwitchOptions<span class="token operator">: </span><a href="../-browser-switch-options/index.html">BrowserSwitchOptions</a></span></span><span class="token punctuation">)</span></div><p class="paragraph">Throws a <a href="../-browser-switch-exception/index.html">BrowserSwitchException</a> when a browser switch flow cannot be started.</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>activity</span></span></u></div></span></div><div><div class="title"><p class="paragraph">the activity used to start browser switch</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>browser</span><wbr><span>Switch</span><wbr><span><span>Options</span></span></u></div></span></div><div><div class="title"><p class="paragraph"><a href="../-browser-switch-options/index.html">BrowserSwitchOptions</a> the options used to configure the browser switch</p></div></div></div></div></div><h4 class="">Throws</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><a href="../-browser-switch-exception/index.html"><span>Browser</span><wbr><span>Switch</span><wbr><span><span>Exception</span></span></a></div></span></div><div><div class="title"><p class="paragraph">exception containing the error message on why browser switch cannot be started</p></div></div></div></div></div></div></div>
6767
</div>
6868
<div class="footer">
69-
<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>
69+
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2026 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>
7070
</div>
7171
</div>
7272
</div>

0 commit comments

Comments
 (0)