Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to turn off the share icon to CustomTabsOptions #487

Closed
latsson opened this issue Jun 11, 2021 · 1 comment · Fixed by #489
Closed

Add possibility to turn off the share icon to CustomTabsOptions #487

latsson opened this issue Jun 11, 2021 · 1 comment · Fixed by #489
Labels
feature request A feature has been asked for or suggested by the community waiting for customer This issue is waiting for a response from the issue or PR author

Comments

@latsson
Copy link
Contributor

latsson commented Jun 11, 2021

Describe the problem you'd like to have solved

It does not really make any sense showing a share icon in a login flow.

Since androidx.browser version 1.3.0 it's now possible to disable the share icon for custom tabs.

See the "How can I opt-out from the share icon showing in my App?" on this blog post.
https://blog.chromium.org/2021/01/better-content-sharing-with-custom-tabs.html

Describe the ideal solution

To be able to turn the share icon off in the CustomTabsOptions builder.

Alternatives and current work-arounds

No work-around found.

Additional information, if any

https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)

@latsson latsson added the feature request A feature has been asked for or suggested by the community label Jun 11, 2021
@lbalmaceda
Copy link
Contributor

@latsson I think this is a valid feature request. But I would not allow users to opt-out of the share button. Instead, I'd just remove it. As you said, there's no need to share a login page externally.

Note, however, that this would only impact Chrome browsers as of today. For that button to be hidden in other browser apps, their devs would need to implement that. From the page you linked:

Please note: this is a change in Chrome’s behavior and we hope other browsers will add similar functionality.

Would you like to send a PR that adds the setShareState(CustomTabsIntent.SHARE_STATE_OFF) to the CCT builder?

@lbalmaceda lbalmaceda added the waiting for customer This issue is waiting for a response from the issue or PR author label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community waiting for customer This issue is waiting for a response from the issue or PR author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants