Showing that your application is installed in the Android browser

I am trying to find a way to detect in my Android browser whether my application is installed.

Use case: I have a web page that a user can get through their Android browser. If the application is installed, it will display "Tips and Tricks." If it is not installed, it will show advertising materials and a link to download the application.

Trying to solve: My initial thoughts were to associate my application with a custom mime type using the application manifest, and on the web page, iterate through the mimeTypes javascript array. I wondered if the mime type appeared in the array, I could assume that the application was installed.

Unfortunately, the mimeTypes array has not changed.

Any ideas how I can determine if my application is installed when a user accesses my web page through an Android browser?

Thanks for any help / understanding you may have.

+3
source share
1 answer

Your local application may have started a local http server. From your web page, you are trying to get some predefined resource from this local application. If it is installed, it will serve, and you know that your application is installed. If your application is not installed on the host device.

+1
source

Source: https://habr.com/ru/post/1721553/


All Articles