GoogleChrome / GoogleChrome/android-browser-helper
Header is not accepting when we use com.android.chrome
- Dominant language
- Java
- Stars
- 832
- Forks
- 370
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
**Read this First**
If you have a Trusted Web Activity related question, the best place to ask it is on StackOverflow, on the
[trusted-web-activity](https://stackoverflow.com/questions/tagged/trusted-web-activity) tag, which is also monitored by the team.
**Describe the bug**
Authorisation token is accepted when we call the custom chrome intent without package name ("com.android.chrome") but when we add the package header is not accepted. I am using a deeplink for custom chrome intent.
**To Reproduce**
Steps to reproduce the behavior:
1. Click on deeplinking URL, redirected the deelink URL on custom package otherwise ask to open app bottom sheet calling recursively '...'
> private CustomTabsIntent constructExtraHeadersIntent(CustomTabsSession session, boolean isDeepLink) {
> CustomTabsIntent intent = new CustomTabsIntent.Builder(session).build();
>
> // Example non-cors-whitelisted headers.
> Bundle headers = new Bundle();
> headers.putString("Authorization", TOKEN);
> intent.intent.putExtra(Browser.EXTRA_HEADERS, headers);
> if (isDeepLink) { // isDeepLink mean the app opened threw any deeplink URL
> intent.intent.setPackage("com.android.chrome");
> }
> return intent;
> }
>
**Expected behavior**
A clear and concise description of what you expected to happen.
**Did this ever used to work**
If applicable, add information on the version where this worked previously.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Code Snippets**
If applicable, add or link to code snippets describing how the API is being used.
**Smartphone (please complete the following information):**
- Device: Samsung S7
- OS: Android-8
- Browsers Installed [Chrome]
- Browser Versions [104.0.5112.97]
- android-browser-helper library version [1.4.0]
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.