Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a Progressive Web App from another android application

i have a question I've got a PWA and i want to open it from another application using the url like mypwascheme:http://my.test.host/mypage

But i have no idea what should i use for the scheme part, ie. mypwascheme

I tried my app's name & short name from the manifest.json but neither did work

Any ideas? Thanks in advance

like image 740
Alex Radyuk Avatar asked Dec 08 '25 17:12

Alex Radyuk


1 Answers

You can use Android Intent Filters. So basically, you can simply have a web link (a normal URL like http://my.test.host/mypage ) embedded into your application. When this tries to open it in the browser, the PWA app intercepts the request (if you have the intent filters defined in your manifest) and open it up there.

Example (using your sample URL):

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data
    android:scheme="http"
    android:host="my.test.host"
    android:pathPrefix="/mypage/" />
</intent-filter>
like image 148
Saurabh Rajpal Avatar answered Dec 11 '25 23:12

Saurabh Rajpal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!