We have a crawl button in our mobile web application. The mobile web application fully supports HTML5 and Angular JS and javascript / ajax. We need to install a third-party application for scanning applications from Google Play / iTunes based on the Android Android / Iphone agent, and if the application is already installed, we need to open it when the user clicks the scan button. Please suggest any solution in the javascript / Angular JS.Below solution I tried
setTimeout(function() { window.location = 'http://my-installation.url';
But this approach is full of questions. Many times it redirects to googleplay / itunes, although the application is installed, and sometimes when the application is not installed, it opens myapp://custom-scheme-url , and then immediately gives an error, for example, "this web page is not available." We also tried using different timeout values, but did not help.
Please indicate if there is any way other than setting a timeout to check whether the application is installed or not.
source share