Hacker News new | ask | show | jobs
by dfabulich 2697 days ago
Yes. The "Trusted Web Activities" (TWA) API referenced in this article is just a convenient way to turn a web page into an Android Activity. (An Activity is a screen in an Android app.)

They don't let you paste an URL into the Google Play Store and convert it to APK automagically. You still have to install Android Studio, build your app as an APK, and upload it.

You could do this before by coding up a full-screen WebView, but TWA is just nicer in a number of ways.

If your app is a paid app, you'll pay Google 30% of that. TWA offers no convenient way to do in-app purchases; if it did, you'd still have to pay Google 30% for those IAPs.

1 comments

> You still have to install Android Studio, build your app as an APK, and upload it.

:(

Not having to do that was what I was hoping for with stores allowing PWAs. Maybe it at least means that the APK only needs to be built once? If it has to be rebuilt for every release, I don't see what this offers that Cordova can't do better.

From the article:

"Is TWA a Hybrid framework, similar to Cordova?

No. With Cordova or other hybrid solutions, you are typically shipping your web resources (HTML, JS, CSS, etc.) within your APK package. Also, the engine is different and isolated from the users’ browser, so no session or cache sharing.

With Trusted Web Activity you don’t need to package any resource file from your PWA (only native components, in case you want them); all your resources will be downloaded and updated on the fly from your Service Worker. Your PWA will still be rendered with the installed Chrome version, sharing all storage, cache, and sessions with the browser. Therefore, if your user has a session on your website opened when the user installs the app from the Play Store, she will still be logged in. The user is just installing a shortcut to Chrome using a special mode."

So what's the point of the APK?
The OS needs an APK to run it. Just opening your page in the browser won't let you customize as much.
To contain the metadata for the store entry?