Because of intertia architecture and lack of index.html, capacitor (which is often recommended) didn’t work. Tried bubblewrap instead, it worked, but isn’t very useful, as you would typically need a progressive web app for this to be useful rather than a normal web app / webiste;
Bubblewrap wraps your app into an “android app”. There’s not much native functionality, other than an icon, main color and ‘splash’ color for loading screen. it doesn’t remember login info when you close it. Setup is very simple, webmanifest.json is in www.yourapp.com/build. Other than that just follow the steps in a new project directory;
Quick Start Guide | Web on Android | Chrome for Developers
Display modes explained (I chose standalone, but if users need the back buttons for example, you can use minimal UI or other); (From developer mozilla)
display - Web app manifests | MDN
For color i uses the tailwind primary 600 color, for splash screen color
Below was capacitor but couldn’t get it to work
Convert a Web Application(PWA) to Android App using TWA(Trusted Web Activity) | by Suraj | Medium
Create a separate project
in the terminal of your new project, run
npm i @capacitor/core
npm i -D @capacitor/cli
npx cap init
If it complains your node version is too old, install new one from;