help with adding custom headers
help with adding custom headers
this is a screenshot from an example.
My code doesn't work either.
in Mainifest.xml
<meta-data android:name="asset_statements" android:resource="@string/asset_statements" />
in string.xml
<string name="asset_statements" translatable="false">[{ \"include\": \"https://qwerty.com/.well-known/assetlinks.json\" }] </string>
file from site: https://qwerty.com/.well-known/assetlinks.json
[{ "relation": ["delegate_permission/common.use_as_origin"], "target" : { "namespace": "android_app", "package_name": "my.app.android", "sha256_cert_fingerprints": ["52:52:52:52:36:D9:4E:F3:DB:E5:3E:0E:7A:2D:3C:D8:08:8E:7A:FF:56:FC:30:E0:59:AC:05:43:CE:CE:CE:CE"] } }]
the rest of the code is as in the example [(https://developer.chrome.com/docs/android/custom-tabs/headers/)]
Trying to access https://qwerty.com/.well-known/assetlinks.json says the site is offline. The screenshot also seems to point to https://custom-tabs-custom-he.glitch.me/, which is not the site being validated. You should open a URL in https://qwerty.com since it's the origin being validated.
qwerty.com was for example real - https://api.busy-fly.com/.well-known/assetlinks.json
qwerty.com was for example real - https://api.busy-fly.com/.well-known/assetlinks.json
The asselinks file looks correct (assuming fingerprints match). So, the custom headers will only be sent when opening URLS under https://api.busy-fly.com.
fingerprint taken with the utility

but my full address looks like "https://api.busy-fly.com/end-user-api/v1/balance-package-purchase-payment-form?balance_package_id=${packageId}")
also does not work with fingerprint keytool -list -v -keystore PATH_TO_KEYSTORE -alias VALUE_OF_ALIAS
I tested this today and can see it working. I did find a couple of issues in the demo application and submitted #280 with fixes. Can you try with those fixes?
I just tested in an emulator with Chrome 89 and can see the demo working:

Maybe it's worth trying to remix the demo here https://glitch.com/edit/#!/custom-tabs-custom-he and changing public/.well-known/assetlinks.json to reflect your own app, then modify the URL on the Android demo.
This headers
headers.putString("bearer-token", "Some token");
headers.putString("redirect-url", "Some redirect url");
Also not working for me, even with correctly configured .well-known/assetlinks.json
Chrome 90.0.4430.91
Hi guys, if you cannot see the extra headers from your app, the following info might be helpful.
- Find the /.well-known/assetlinks.json from https://glitch.com/edit/#!/custom-tabs-custom-he, you will not be able to see the .well-known folder on the left panel since it's a hidden folder. Click the "Remix to Edit" from the right top pop-up window, it will clone the project into your account. Then you can click the "Tools" on the left bottom, then "Terminal", and cd to ./public/.well-known and you'll see the assetlinks.json file.
- Replace the "sha256_cert_fingerprints" with yours.
- Make sure it contains "use_as_origin" relation
"relation": ["delegate_permission/common.use_as_origin"]
Tested with Chrome 90.0.4430.210
@andreban I setup my assetlinks file here https://namnh-0652.github.io/.well-known/assetlinks.json and try the demo app with my link "https://namnh-0652.github.io" but no headers are added.
CCT version 9x.
@DmitryDogar , @lionandbull any updated status from you guys?
@andreban I setup my assetlinks file here https://namnh-0652.github.io/.well-known/assetlinks.json and try the demo app with my link "https://namnh-0652.github.io" but no headers are added.
CCT version 9x.
@DmitryDogar , @lionandbull any updated status from you guys?
Same issue for me with the demo app (here is my assetlinks file)