Git Product home page Git Product logo

bento-starter-twa's Introduction

BentoStarter / Trusted Web Activity

I used svgomg-twa repos from GoogleChromeLabs to create this android app.

This project uses the Trusted Web Activities technology to wrap BentoStarter in an Android Application.

Running the Demo (from GoogleChromeLabs/svgomg-twa)

  1. Clone the project git clone https://github.com/GoogleChromeLabs/svgomg-twa.git

  2. Import the Project into Android Studio, using File > New > Import Project, and select the folder to which the project was cloned.

  3. Run the Project (Ctrl+R)

Enabling Debug

TWAs require Digital AssetLinks to be setup on both the application and on the website, in order to enable the validation that allows Chrome to open the page in full-screen.

For security reasons, the signing key compatible with the setup on https://svgomg.firebaseapp.com/ is not committed with the sample code.

It is possible to setup Chrome to skip validation on device to enable testing.

Here are the 2 steps required to achieve this:

  1. Enable Chrome to accept command-line parameters:

On the Android Device, go to the Chrome version being used to test the TWA and navigate to chrome://flags. Search for a setting called Enable commmand line on non-rooted devices and change it to Enabled. Restarting the browser multiple times may be required.

  1. Create an Android file with the command-line parameters that allow skipping the TWA validation.

Add a file at /data/local/tmp/chrome-command-line, with the content _ --disable-digital-asset-link-verification-for-url="https://svgomg.firebaseapp.com". Make sure there's not newline at the end of the line, or it may break the launcher.

For convenience, a shell script that creates this file is available in this repository. Run it by executing ./enable-debug.sh https://svgomg.firebaseapp.com.

To debug a different PWA, execute the script with a different host: ./enable-debug.sh https://example.com

bento-starter-twa's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.