Fireship · @fireship
PWA to Google Play Store with Trusted Web Activities (TWA)
Uploaded February 22, 2019 · Length 7:08
Summary
Learn how to package a progressive web app (PWA) as a Google Play Store app using Trusted Web Activities (TWA).
- trusted web activities
- pwa to google play store
- android app development
- progressive web apps
- google play store
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:07
over the last couple years progressive
- 0:08
web apps have revolutionized the way we
- 0:10
build products on the web but one of the
- 0:11
biggest limitations is that they're not
- 0:13
discoverable on the app stores
- 0:14
if you want to write your web code once
- 0:16
and then reuse it everywhere you'll most
- 0:17
likely use a framework like ionic to
- 0:19
wrap your code in a web view
- 0:20
but get ready to learn about an
- 0:22
interesting new alternative to this
- 0:23
approach
- 0:23
a trusted web activity if you're new
- 0:25
here like and subscribe and you can grab
- 0:27
the full source code on fire ship i o
- 0:29
and i'm giving away another t-shirt with
- 0:30
this video all you have to do is let me
- 0:31
know what you think about twas in the
- 0:33
comments below
- 0:34
first of all what is a trusted web
- 0:36
activity the short answer
- 0:37
is that it's just a way to run a website
- 0:39
in full screen mode within an android
- 0:41
package
- 0:42
you can already do this today and i'll
- 0:43
show you how to do it step by step in
- 0:44
this video we'll take the existing
- 0:46
fireship io pwa
- 0:47
package it up in android and then deploy
- 0:49
it to the google play store
- 0:51
before we get into that you might be
- 0:52
wondering whether you should build a
- 0:53
hybrid webview app or deploy as a twa
- 0:56
let's start by looking at some of the
- 0:58
advantages of a twa
- 0:59
first of all it's very easy and if you
- 1:01
have an existing pwa you can follow
- 1:03
along with this video and have it on
- 1:04
google play in the next few minutes and
- 1:06
unlike a web view it's not sandboxed so
- 1:07
you have access to all the features of a
- 1:09
pwa this means you can use things like
- 1:11
oauth and local storage without having
- 1:13
to patch in cordova plugins in other
- 1:15
words whatever works in your pwa
- 1:16
currently is going to work just as well
- 1:18
in this native app and your content will
- 1:20
always stay up to date so if you deploy
- 1:22
a new feature to your pwa it will
- 1:23
automatically be reflected in the native
- 1:25
app as well there are also some
- 1:26
drawbacks here as well for example this
- 1:28
is only for google play has nothing to
- 1:30
do with the apple app store
- 1:31
the next drawback is that there isn't a
- 1:33
plug-in ecosystem and you don't have
- 1:34
access to the native device features
- 1:36
so you need to rely 100 on the features
- 1:39
available to pwas
- 1:40
and lastly you need to comply with all
- 1:42
the policies for the google play store
- 1:44
so that could complicate things if you
- 1:45
have a payment system that would
- 1:47
otherwise require in-app purchases
- 1:48
so what's the bottom line here well if
- 1:50
you have a progressive web app and you
- 1:52
just want it packaged so it's
- 1:53
discoverable on the google play store
- 1:54
then a twa is something you should
- 1:56
definitely be looking into
- 1:57
and at this point i'd like to give a
- 1:58
huge shout out to zven budek he has a


