0

Is there a way to add an URI scheme for Android TWAs?

I've added my own scheme in our TWA, say for example <data android:scheme="blah"/>. However, when I try to access the URI using blah:// when the app had not been launched, it fails to launch the app; It works however when the app has already been launched. Is there a way for us to add a scheme in the TWA that also succeeds on launch?

Jialu
  • 114
  • 10
  • Can you add more context on why the URI scheme is being added? https + AppsLinks generally work well with TWAs. – andreban Mar 05 '20 at 13:39
  • I've been wanting to try to add another URI scheme other than http and https (let's just say blah://); this is so I would be able to have the TWA app opened from elsewhere. I mean ultimately it does not have to be done by adding an URI scheme, but is there another method of doing so with TWAs? – Jialu Mar 05 '20 at 14:29
  • Can you paste your AndroidManifest.xml? Also, in this context, does elsewhere mean a web page in the browser or another app? – andreban Mar 05 '20 at 20:55
  • The AndroidManifest.xml is based on https://github.com/GoogleChromeLabs/svgomg-twa The only change I've made as testing is adding to the intent-filter, and the behaviour is as mentioned in the question. For context, this is for the intention of opening from a webpage and another app. If there are ways around to get one for now, we are happy to explore into just that. Thanks – Jialu Mar 06 '20 at 10:56
  • You need to add another intent-filter to the Activity. Something like this: – andreban Apr 26 '20 at 08:45

0 Answers0