Adding Splash Screen to Trusted Web Activity with Android’s FileProvider
Learn how you can add a splash screen to your Trusted Web Activity (TWA) with Android’s FileProvider.
⚠️ THIS ARTICLE IS MORE THAN 1 YEAR OLD.
Please refer to this article on how to add splash screen to Trusted Web Activities.
What is Trusted Web Activity?
Trusted Web Activities (TWA) are a new way to integrate your web-app content such as your PWA with your Android app using a protocol based on Custom Tabs.
Step 1: Add Logo
Add your app logo to the drawable folder (using Asset Studio). In this case, I set the logo size to 96dp and named it
Step 2: Create an XML file
Create a new XML file in the XML resources folder. In this case, I’m calling it
Then, add the following code to the XML file you just created:
Step 3: Update AndroidManifest.xml
AndroidManifest.xml file by adding a new
Step 4: Update the Trusted Web Activity Library
Make sure you are using the latest build of Chrome Tabs Client (or at least build 3679335).
Check the latest build here: https://chromium.googlesource.com/custom-tabs-client/+log
You can update the library in the
Step 5: Party Time 🎉
Now you should see your app logo showing in the splash screen. Yay!
CSS Tricks has an awesome article about how you can implement Trusted Web Activity to your Progressive Web App, you can learn more here:
Note: This method is based on the doc from the custom-tabs-client library:
Psst, are you a public speaker or you are going to give a presentation soon?
Try out Remote for Slides. It allows you to control Google Slides on any device, remotely, without the need of any extra hardware: