@
@
@nixbox2020-10-29 00:34:39
JavaScript
@nixbox, 2020-10-29 00:34:39

How to check if map applications (Google/Yandex) are installed from a browser using a link on a smartphone?

Greetings!

There is a task of opening native map applications (Yandex and Google) on the phone using a link from the browser.

For this, Yandex, for example, has a special URL (yandexmaps://maps.yandex.ru/).

But there is a need to first check whether map applications are installed on the phone, so that if they are not available, open the map in the browser.
As far as I understand, it will be impossible to check whether the application is installed on the phone from the browser for security reasons.

Maybe this can be done by checking somehow whether there is such a URL scheme on the phone?
Or how can it be done in principle? Somehow to catch in JS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-10-30
@SilenceOfWinter

ajax send a request to yandexmaps://maps.yandex.ru/ and check the result

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question