Skip to content

Custom headers with TWALauncher #329

@tobiasharle

Description

@tobiasharle

Hi,

I have built a TWA app that uses the TwaLauncher to launch.

I'm currently in a position where I need to send a token that was stored in a previous version of the native app to the web site which I'm starting. I thought the most suitable way to do this was to send it as a custom header.

So I took a look at the Custom Headers Demo and eventually got it working in my app.

However, the only way forward I could see was to copy the code from TwaLauncher into my own app and modify it.
Besides adding the handle_all_urls relationship to my asset statements, it seems as if client.warmup is always required as well as mSession.validateRelationship(CustomTabsService.RELATION_USE_AS_ORIGIN, URL, null)

To avoid having to "own" all the TwaLauncher code, I guess I'm requesting some way to tell it to set up the extra validation for me. Or am I missing something?

Best Regards
Tobias

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions