Redirecting to the Capacitor app when user opens or clicks some specific links


I am looking for a solution to my problem. When user clicks or opens some links, the mobile device should redirect to my app’s specific page. I am building a taxi mobile app, and most of my clients use Telegram as their main messenger, so there is a feature that they can share their location by using Google Maps under the hood. It is like this:

When user touches this location box, it will open a location app into the app’s specific pages (Yandex maps, Google maps) or ask what app it should open
Here is another example of this:

I want to put my app into the list of these apps. How can I do that?

Thank you for the answer!

No, app-launcher plugin is for launching other apps from your apps, not to make other apps open your app.

For making your app appear in the list of apps that can open maps, you have to register your app for handling geolocation, most likely with geo: scheme.

1 Like

Thank you for the answer, sir.

If there are any instructions about exactly how to register the Capacitor app (on Vue.js) to handle geoposition activities, could you share some? I tried ‘deep-linking’ but it seems that is not the best solution.

There is an example on the link:

<activity ...>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="geo" />
        <category android:name="android.intent.category.DEFAULT" />

You have to add the <intent-filter> part inside your existing activity tag in your AndroidManifest.xml file.

That worked exactly it should! Now, I have one question left, sorry for bothering you too much. How can I catch the event of this redirect? I mean, how can I know if user is redirected from a geoposition link to my app? I should redirect him/her into specific page.

and when I press the geoposition link and select my app from the list, my app is not opening anything, just a black screen. I think, I am missing something.

You should be able to use App plugin and listen for appUrlOpen event, it should contain the url

then how you handle the url is up to you or your app logic, can’t help you with that

Thank you very much!