V
V
valeriy_good2020-10-22 18:58:50
PHP
valeriy_good, 2020-10-22 18:58:50

How to find out if viber is installed on the device?

I work with the site, it has a block in the sidebar with links to social networks, one of them is on viber. The problem is that if the application is not installed on the device from which they are trying to click on viber, then the person is transferred to an empty document (on a PC) or an alert is displayed that the viber application is not installed (on MU). The first thing that comes to mind is to do a type check:

(if the application is installed) {
in href, substitute a link to the chat;
}
(otherwise) {
in href, substitute a link to the viber's official website to download the application;
}

How can I find out if the application is installed on the device or not? Or maybe there is an alternative solution to the problem?
Link to the site absolutnsk.ru

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2020-10-22
@inoise

No way. This information is not provided to the browser

S
Sergey_0287, 2020-10-22
@Sergey_0287

Yes, I agree, unfortunately there is no way to check in the browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question